<template>
  <div class="ne-order-pos">
    <!-- 查询区 -->
    <el-row style="margin-bottom: 0.15rem">
      <el-col :span="3">
        <el-select
          v-model="selectValue"
          @change="baseFilterChange"
          placeholder="请选择"
        >
          <el-option
            v-for="item in baseOptions"
            :key="item.value"
            :label="item.label"
            :value="item"
          ></el-option>
        </el-select>
      </el-col>
      <el-col :span="4" v-show="selectValue.type == 0">
        <el-input v-model="baseValue" placeholder="请输入查询信息"></el-input>
      </el-col>
      <el-col
        :span="3"
        v-show="selectValue.type == 1 && selectValue.value == 5"
      >
        <el-select v-model="lastStateCdValue" placeholder="请选择单据状态">
          <el-option
            v-for="item in lastStateCdOptions"
            :key="item.value"
            :label="item.label"
            :value="item"
          ></el-option>
        </el-select>
      </el-col>
      <el-col
        :span="3"
        v-show="selectValue.type == 1 && selectValue.value == 4"
      >
        <el-select v-model="serviceOfferNameValue" placeholder="清选择登记事项">
          <el-option
            v-for="item in serviceOfferNameOptions"
            :key="item.value"
            :label="item.label"
            :value="item"
          ></el-option>
        </el-select>
      </el-col>
      <!--      <el-col :span="3" v-show="selectValue.type == 0">-->
      <!--        <el-radio-group class="ne-radio-group" v-model="filterMode">-->
      <!--          <el-radio label="1">精确</el-radio>-->
      <!--          <el-radio label="2">模糊</el-radio>-->
      <!--        </el-radio-group>-->
      <!--      </el-col>-->
      <el-col :span="2" style="margin-left: 0.2rem">
        <el-button type="primary" size="small" @click="searchFun"
          >查询</el-button
        >
      </el-col>
      <el-col :span="4" class="right">
        <el-popover
          @show="dealShowEvent(1)"
          popper-class="ne-pending"
          placement="left"
          trigger="click"
        >
          <ul v-if="operateWithData" class="ne-pending-items flex f-mt0">
            <li v-for="(item, index) in operateWithData" :key="index">
              <a @click="openTopPendDialog(item, 'OPER')">{{ item.title }}</a>
            </li>
          </ul>
          <p v-else>暂无任务</p>
          <el-button
            type="primary"
            slot="reference"
            style="
              border-top-right-radius: 0;
              border-bottom-right-radius: 0;
              margin-right: 0.01rem;
            "
          >
            操作
            <i class="el-icon-coordinate el-icon--right"></i>
          </el-button>
        </el-popover>
        <el-popover
          @show="dealShowEvent(2)"
          popper-class="ne-pending"
          placement="left"
          trigger="click"
        >
          <ul v-if="dealWithData" class="ne-pending-items flex">
            <li v-for="(item, index) in dealWithData" :key="index">
              <a @click="openTopPendDialog(item, 'DEAL')">{{ item.title }}</a>
            </li>
          </ul>
          <p v-else>暂无任务</p>
          <el-button
            type="primary"
            slot="reference"
            style="border-radius: 0; margin-right: 0.01rem"
          >
            处理
            <i class="el-icon-coordinate el-icon--right"></i>
          </el-button>
        </el-popover>
        <el-popover
          @show="dealShowEvent(3)"
          popper-class="ne-pending"
          placement="left"
          trigger="click"
        >
          <ul v-if="outputWithData" class="ne-pending-items flex">
            <li v-for="(item, index) in outputWithData" :key="index">
              <a @click="openTopPendDialog(item, 'EXPORT')">{{ item.title }}</a>
            </li>
          </ul>
          <p v-else>暂无任务</p>
          <el-button
            type="primary"
            slot="reference"
            style="border-top-left-radius: 0; border-bottom-left-radius: 0"
          >
            输出
            <i class="el-icon-coordinate el-icon--right"></i>
          </el-button>
        </el-popover>
      </el-col>
    </el-row>
    <!-- 表格区 -->
    <el-table
      class="jlTable"
      border
      style="width: 100%"
      max-height="450"
      :header-cell-style="{ background: '#F2F2F2', color: '#333'}"
      :data="orderItemList"
      @selection-change="handleSelectionChange"
      v-loading="loading"
      element-loading-customClass="ne-loading"
      element-loading-background="rgba(255, 255, 255, 0.6)"
    >
      <el-table-column type="selection" width="55" fixed="left"></el-table-column>
      <el-table-column label="流水号" width="200" fixed="left">
        <template slot-scope="scope"><a @click="goDetailView(scope.row)" style="color: blue; cursor: pointer">
            {{
              JSON.parse(scope.row.batchNbr) > 0
                ? scope.row.custSoNumber +
                  "-" +
                  scope.row.batchNbr +
                  "(" +
                  scope.row.orderItemSeq +
                  ")"
                : scope.row.custSoNumber + "(" + scope.row.orderItemSeq + ")"
            }}
          </a></template>
      </el-table-column>
      <el-table-column label="操作" width="250" fixed="left">
        <template slot-scope="scope">
          <el-popover
            popper-class="ne-pending"
            placement="right"
            trigger="hover"
          >
            <ul class="ne-pending-items flex f-mt0">
              <li v-for="(item2, index) in lookListData" :key="index">
                <a @click="openLookPendDialog(item2, scope.row)">{{
                  item2.title
                }}</a>
              </li>
            </ul>

            <el-button
              slot="reference"
              class="ne-btn ne-m-right find"
              type="success"
              plain
            >
              <i class="el-icon-view"></i>查看
            </el-button>
          </el-popover>

          <el-button
            class="ne-btn fujian"
            type="warning"
            plain
            @click="openUploadFile(scope.row)"
          >
            <i class="el-icon-upload el-icon--right"></i>附件
          </el-button>

          <el-popover
            @show="dealTaskEvent(scope.row)"
            popper-class="ne-pending"
            placement="right"
            trigger="hover"
          >
            <ul
              v-if="pendingListData.length > 0"
              class="ne-pending-items flex"
              style="overflow-y: scroll"
            >
              <li v-for="(item2, index) in pendingListData" :key="index">
                <a @click="bjAnchorFun(item2)">{{ item2.title }}</a>
              </li>
            </ul>
            <p v-else>暂无任务</p>
            <el-button
              class="ne-btn daichuli"
              type="danger"
              slot="reference"
              plain
              :disabled="
                scope.row.statusCd == '401300' || scope.row.statusCd == '401400'
                  ? true
                  : false
              "
            >
              <i class="el-icon-pie-chart"></i>待处理
            </el-button>
          </el-popover>
        </template>
      </el-table-column>
      <el-table-column label="流程" width="70" fixed="left">
        <template slot-scope="scope">
          <!-- <router-link target="_blank" :to="{name:'flowChart',params:{id:scope.row.processInstId}}"> -->
          <a @click="toFlowChart(scope.row)">
            <i class="el-icon-share orange" style="font-size: 0.18rem"></i>
          </a>
          <!-- </router-link> -->
        </template>
      </el-table-column>
      <el-table-column label="销售品名称" width="200">
        <template slot-scope="scope">
          <div v-if="scope.row.statusCd == '401300'" class="warn-red-f">
            {{ scope.row.offerName }}
          </div>
          <div v-else-if="scope.row.statusCd == '401400'" class="warn-orange-f">
            {{ scope.row.offerName }}
          </div>
          <div v-else-if="scope.row.statusCd == '401498'" class="warn-orange-f">
            {{ scope.row.offerName }}
          </div>
          <div
            v-else-if="scope.row.statusCd == '9005002'"
            class="warn-orange-f"
          >
            {{ scope.row.offerName }}
          </div>
          <div v-else-if="scope.row.statusCd == '300000'" class="warn-green-f">
            {{ scope.row.offerName }}
          </div>
          <div v-else-if="scope.row.statusCd == '300098'" class="warn-blue-f">
            {{ scope.row.offerName }}
          </div>
          <div v-else class="warn-normail">{{ scope.row.offerName }}</div>
        </template>
      </el-table-column>
      <el-table-column label="产品名称" width="100">
        <template slot-scope="scope">
          <div v-if="scope.row.statusCd == '401300'" class="warn-red-f">
            {{ scope.row.prodName }}
          </div>
          <div v-else-if="scope.row.statusCd == '401400'" class="warn-orange-f">
            {{ scope.row.prodName }}
          </div>
          <div v-else-if="scope.row.statusCd == '401498'" class="warn-orange-f">
            {{ scope.row.prodName }}
          </div>
          <div
            v-else-if="scope.row.statusCd == '9005002'"
            class="warn-orange-f"
          >
            {{ scope.row.prodName }}
          </div>
          <div v-else-if="scope.row.statusCd == '300000'" class="warn-green-f">
            {{ scope.row.prodName }}
          </div>
          <div v-else-if="scope.row.statusCd == '300098'" class="warn-blue-f">
            {{ scope.row.prodName }}
          </div>
          <div v-else class="warn-normail">{{ scope.row.prodName }}</div>
        </template>
      </el-table-column>
      <el-table-column label="单据状态" width="100">
        <template slot-scope="scope">
          <div v-if="scope.row.statusCd == '401300'" class="warn-red-f">
            {{ scope.row.statusCdName }}
          </div>
          <div v-else-if="scope.row.statusCd == '401400'" class="warn-orange-f">
            {{ scope.row.statusCdName }}
          </div>
          <div v-else-if="scope.row.statusCd == '401498'" class="warn-orange-f">
            {{ scope.row.statusCdName }}
          </div>
          <div
            v-else-if="scope.row.statusCd == '9005002'"
            class="warn-orange-f"
          >
            {{ scope.row.statusCdName }}
          </div>
          <div v-else-if="scope.row.statusCd == '300000'" class="warn-green-f">
            {{ scope.row.statusCdName }}
          </div>
          <div v-else-if="scope.row.statusCd == '300098'" class="warn-blue-f">
            {{ scope.row.statusCdName }}
          </div>
          <div v-else class="warn-normail">{{ scope.row.statusCdName }}</div>
        </template>
      </el-table-column>
      <el-table-column label="需求单要求完成时间" width="200">
        <template slot-scope="scope">
          <div v-if="scope.row.statusCd == '401300'" class="warn-red-f">
            {{ scope.row.reqOrderDate }}
          </div>
          <div v-else-if="scope.row.statusCd == '401400'" class="warn-orange-f">
            {{ scope.row.reqOrderDate }}
          </div>
          <div v-else-if="scope.row.statusCd == '401498'" class="warn-orange-f">
            {{ scope.row.reqOrderDate }}
          </div>
          <div
            v-else-if="scope.row.statusCd == '9005002'"
            class="warn-orange-f"
          >
            {{ scope.row.reqOrderDate }}
          </div>
          <div v-else-if="scope.row.statusCd == '300000'" class="warn-green-f">
            {{ scope.row.reqOrderDate }}
          </div>
          <div v-else-if="scope.row.statusCd == '300098'" class="warn-blue-f">
            {{ scope.row.reqOrderDate }}
          </div>
          <div v-else class="warn-normail">{{ scope.row.reqOrderDate }}</div>
        </template>
      </el-table-column>
      <el-table-column label="订单要求完成时间" width="200">
        <template slot-scope="scope">
          <div v-if="scope.row.statusCd == '401300'" class="warn-red-f">
            {{ scope.row.orderDate }}
          </div>
          <div v-else-if="scope.row.statusCd == '401400'" class="warn-orange-f">
            {{ scope.row.orderDate }}
          </div>
          <div v-else-if="scope.row.statusCd == '401498'" class="warn-orange-f">
            {{ scope.row.orderDate }}
          </div>
          <div
            v-else-if="scope.row.statusCd == '9005002'"
            class="warn-orange-f"
          >
            {{ scope.row.orderDate }}
          </div>
          <div v-else-if="scope.row.statusCd == '300000'" class="warn-green-f">
            {{ scope.row.orderDate }}
          </div>
          <div v-else-if="scope.row.statusCd == '300098'" class="warn-blue-f">
            {{ scope.row.orderDate }}
          </div>
          <div v-else class="warn-normail">{{ scope.row.orderDate }}</div>
        </template>
      </el-table-column>
      <el-table-column label="竣工完成日期" width="200">
        <template slot-scope="scope">
          <div v-if="scope.row.statusCd == '401300'" class="warn-red-f">
            {{ scope.row.finishTime }}
          </div>
          <div v-else-if="scope.row.statusCd == '401400'" class="warn-orange-f">
            {{ scope.row.finishTime }}
          </div>
          <div v-else-if="scope.row.statusCd == '401498'" class="warn-orange-f">
            {{ scope.row.finishTime }}
          </div>
          <div
            v-else-if="scope.row.statusCd == '9005002'"
            class="warn-orange-f"
          >
            {{ scope.row.finishTime }}
          </div>
          <div v-else-if="scope.row.statusCd == '300000'" class="warn-green-f">
            {{ scope.row.finishTime }}
          </div>
          <div v-else-if="scope.row.statusCd == '300098'" class="warn-blue-f">
            {{ scope.row.finishTime }}
          </div>
          <div v-else class="warn-normail">{{ scope.row.finishTime }}</div>
        </template>
      </el-table-column>
      <el-table-column label="竣工操作日期" width="200">
        <template slot-scope="scope">
          <div v-if="scope.row.statusCd == '401300'" class="warn-red-f">
            {{ scope.row.finishOperDate }}
          </div>
          <div v-else-if="scope.row.statusCd == '401400'" class="warn-orange-f">
            {{ scope.row.finishOperDate }}
          </div>
          <div v-else-if="scope.row.statusCd == '401498'" class="warn-orange-f">
            {{ scope.row.finishOperDate }}
          </div>
          <div
            v-else-if="scope.row.statusCd == '9005002'"
            class="warn-orange-f"
          >
            {{ scope.row.finishOperDate }}
          </div>
          <div v-else-if="scope.row.statusCd == '300000'" class="warn-green-f">
            {{ scope.row.finishOperDate }}
          </div>
          <div v-else-if="scope.row.statusCd == '300098'" class="warn-blue-f">
            {{ scope.row.finishOperDate }}
          </div>
          <div v-else class="warn-normail">{{ scope.row.finishOperDate }}</div>
        </template>
      </el-table-column>
      <el-table-column label="起租/退租日期" width="200">
        <template slot-scope="scope">
          <div v-if="scope.row.statusCd == '401300'" class="warn-red-f">
            {{ scope.row.beginRentDate }}
          </div>
          <div v-else-if="scope.row.statusCd == '401400'" class="warn-orange-f">
            {{ scope.row.beginRentDate }}
          </div>
          <div v-else-if="scope.row.statusCd == '401498'" class="warn-orange-f">
            {{ scope.row.beginRentDate }}
          </div>
          <div
            v-else-if="scope.row.statusCd == '9005002'"
            class="warn-orange-f"
          >
            {{ scope.row.beginRentDate }}
          </div>
          <div v-else-if="scope.row.statusCd == '300000'" class="warn-green-f">
            {{ scope.row.beginRentDate }}
          </div>
          <div v-else-if="scope.row.statusCd == '300098'" class="warn-blue-f">
            {{ scope.row.beginRentDate }}
          </div>
          <div v-else class="warn-normail">{{ scope.row.beginRentDate }}</div>
        </template>
      </el-table-column>
      <el-table-column label="设备号" width="200">
        <template slot-scope="scope">
          <div v-if="scope.row.statusCd == '401300'" class="warn-red-f">
            {{ scope.row.accNum }}
          </div>
          <div v-else-if="scope.row.statusCd == '401400'" class="warn-orange-f">
            {{ scope.row.accNum }}
          </div>
          <div v-else-if="scope.row.statusCd == '401498'" class="warn-orange-f">
            {{ scope.row.accNum }}
          </div>
          <div
            v-else-if="scope.row.statusCd == '9005002'"
            class="warn-orange-f"
          >
            {{ scope.row.accNum }}
          </div>
          <div v-else-if="scope.row.statusCd == '300000'" class="warn-green-f">
            {{ scope.row.accNum }}
          </div>
          <div v-else-if="scope.row.statusCd == '300098'" class="warn-blue-f">
            {{ scope.row.accNum }}
          </div>
          <div v-else class="warn-normail">{{ scope.row.accNum }}</div>
        </template>
      </el-table-column>
      <el-table-column label="业务类型" width="200">
        <template slot-scope="scope">
          <div v-if="scope.row.statusCd == '401300'" class="warn-red-f">
            {{ scope.row.busiTypeName }}
          </div>
          <div v-else-if="scope.row.statusCd == '401400'" class="warn-orange-f">
            {{ scope.row.busiTypeName }}
          </div>
          <div v-else-if="scope.row.statusCd == '401498'" class="warn-orange-f">
            {{ scope.row.busiTypeName }}
          </div>
          <div
            v-else-if="scope.row.statusCd == '9005002'"
            class="warn-orange-f"
          >
            {{ scope.row.busiTypeName }}
          </div>
          <div v-else-if="scope.row.statusCd == '300000'" class="warn-green-f">
            {{ scope.row.busiTypeName }}
          </div>
          <div v-else-if="scope.row.statusCd == '300098'" class="warn-blue-f">
            {{ scope.row.busiTypeName }}
          </div>
          <div v-else class="warn-normail">{{ scope.row.busiTypeName }}</div>
        </template>
      </el-table-column>
      <el-table-column label="登记事项" width="100">
        <template slot-scope="scope">
          <div v-if="scope.row.statusCd == '401300'" class="warn-red-f">
            {{ scope.row.serviceOfferName }}
          </div>
          <div v-else-if="scope.row.statusCd == '401400'" class="warn-orange-f">
            {{ scope.row.serviceOfferName }}
          </div>
          <div v-else-if="scope.row.statusCd == '401498'" class="warn-orange-f">
            {{ scope.row.serviceOfferName }}
          </div>
          <div
            v-else-if="scope.row.statusCd == '9005002'"
            class="warn-orange-f"
          >
            {{ scope.row.serviceOfferName }}
          </div>
          <div v-else-if="scope.row.statusCd == '300000'" class="warn-green-f">
            {{ scope.row.serviceOfferName }}
          </div>
          <div v-else-if="scope.row.statusCd == '300098'" class="warn-blue-f">
            {{ scope.row.serviceOfferName }}
          </div>
          <div v-else class="warn-normail">
            {{ scope.row.serviceOfferName }}
          </div>
        </template>
      </el-table-column>
      <!-- <el-table-column label="优先级别" width="100">
        <template slot-scope="scope">
          <div v-if="scope.row.statusCd == '401300'" class="warn-red-f">
            {{ scope.row.priorityName }}
          </div>
          <div v-else-if="scope.row.statusCd == '401400'" class="warn-orange-f">
            {{ scope.row.priorityName }}
          </div>
          <div v-else-if="scope.row.statusCd == '401498'" class="warn-orange-f">
            {{ scope.row.priorityName }}
          </div>
          <div
            v-else-if="scope.row.statusCd == '9005002'"
            class="warn-orange-f"
          >
            {{ scope.row.priorityName }}
          </div>
          <div v-else-if="scope.row.statusCd == '300000'" class="warn-green-f">
            {{ scope.row.priorityName }}
          </div>
          <div v-else-if="scope.row.statusCd == '300098'" class="warn-blue-f">
            {{ scope.row.priorityName }}
          </div>
          <div v-else class="warn-normail">{{ scope.row.priorityName }}</div>
        </template>
      </el-table-column> -->
      <el-table-column label="通达地点" width="100">
        <template slot-scope="scope">
          <div v-if="scope.row.statusCd == '401300'" class="warn-red-f">
            {{ scope.row.regionRange }}
          </div>
          <div v-else-if="scope.row.statusCd == '401400'" class="warn-orange-f">
            {{ scope.row.regionRange }}
          </div>
          <div v-else-if="scope.row.statusCd == '401498'" class="warn-orange-f">
            {{ scope.row.regionRange }}
          </div>
          <div
            v-else-if="scope.row.statusCd == '9005002'"
            class="warn-orange-f"
          >
            {{ scope.row.regionRange }}
          </div>
          <div v-else-if="scope.row.statusCd == '300000'" class="warn-green-f">
            {{ scope.row.regionRange }}
          </div>
          <div v-else-if="scope.row.statusCd == '300098'" class="warn-blue-f">
            {{ scope.row.regionRange }}
          </div>
          <div v-else class="warn-normail">{{ scope.row.regionRange }}</div>
        </template>
      </el-table-column>
      <el-table-column label="原流水号" width="200">
        <template slot-scope="scope">
          <div v-if="scope.row.statusCd == '401300'" class="warn-red-f">
            {{ scope.row.modOldOrderNbr }}
          </div>
          <div v-else-if="scope.row.statusCd == '401400'" class="warn-orange-f">
            {{ scope.row.modOldOrderNbr }}
          </div>
          <div v-else-if="scope.row.statusCd == '401498'" class="warn-orange-f">
            {{ scope.row.modOldOrderNbr }}
          </div>
          <div
            v-else-if="scope.row.statusCd == '9005002'"
            class="warn-orange-f"
          >
            {{ scope.row.modOldOrderNbr }}
          </div>
          <div v-else-if="scope.row.statusCd == '300000'" class="warn-green-f">
            {{ scope.row.modOldOrderNbr }}
          </div>
          <div v-else-if="scope.row.statusCd == '300098'" class="warn-blue-f">
            {{ scope.row.modOldOrderNbr }}
          </div>
          <div v-else class="warn-normail">{{ scope.row.modOldOrderNbr }}</div>
        </template>
      </el-table-column>
      <el-table-column label="业务经理" width="100">
        <template slot-scope="scope">
          <div v-if="scope.row.statusCd == '401300'" class="warn-red-f">
            {{ scope.row.busiManagerName }}
          </div>
          <div v-else-if="scope.row.statusCd == '401400'" class="warn-orange-f">
            {{ scope.row.busiManagerName }}
          </div>
          <div v-else-if="scope.row.statusCd == '401498'" class="warn-orange-f">
            {{ scope.row.busiManagerName }}
          </div>
          <div
            v-else-if="scope.row.statusCd == '9005002'"
            class="warn-orange-f"
          >
            {{ scope.row.busiManagerName }}
          </div>
          <div v-else-if="scope.row.statusCd == '300000'" class="warn-green-f">
            {{ scope.row.busiManagerName }}
          </div>
          <div v-else-if="scope.row.statusCd == '300098'" class="warn-blue-f">
            {{ scope.row.busiManagerName }}
          </div>
          <div v-else class="warn-normail">{{ scope.row.busiManagerName }}</div>
        </template>
      </el-table-column>
      <el-table-column label="甲端用户名称" width="200">
        <template slot-scope="scope">
          <div v-if="scope.row.statusCd == '401300'" class="warn-red-f">
            {{ scope.row.useCustName }}
          </div>
          <div v-else-if="scope.row.statusCd == '401400'" class="warn-orange-f">
            {{ scope.row.useCustName }}
          </div>
          <div v-else-if="scope.row.statusCd == '401498'" class="warn-orange-f">
            {{ scope.row.useCustName }}
          </div>
          <div
            v-else-if="scope.row.statusCd == '9005002'"
            class="warn-orange-f"
          >
            {{ scope.row.useCustName }}
          </div>
          <div v-else-if="scope.row.statusCd == '300000'" class="warn-green-f">
            {{ scope.row.useCustName }}
          </div>
          <div v-else-if="scope.row.statusCd == '300098'" class="warn-blue-f">
            {{ scope.row.useCustName }}
          </div>
          <div v-else class="warn-normail">{{ scope.row.useCustName }}</div>
        </template>
      </el-table-column>
      <el-table-column label="甲端联系人" width="100">
        <template slot-scope="scope">
          <div v-if="scope.row.statusCd == '401300'" class="warn-red-f">
            {{ scope.row.contactName }}
          </div>
          <div v-else-if="scope.row.statusCd == '401400'" class="warn-orange-f">
            {{ scope.row.contactName }}
          </div>
          <div v-else-if="scope.row.statusCd == '401498'" class="warn-orange-f">
            {{ scope.row.contactName }}
          </div>
          <div
            v-else-if="scope.row.statusCd == '9005002'"
            class="warn-orange-f"
          >
            {{ scope.row.contactName }}
          </div>
          <div v-else-if="scope.row.statusCd == '300000'" class="warn-green-f">
            {{ scope.row.contactName }}
          </div>
          <div v-else-if="scope.row.statusCd == '300098'" class="warn-blue-f">
            {{ scope.row.contactName }}
          </div>
          <div v-else class="warn-normail">{{ scope.row.contactName }}</div>
        </template>
      </el-table-column>
      <el-table-column label="甲端联系人电话" width="200">
        <template slot-scope="scope">
          <div v-if="scope.row.statusCd == '401300'" class="warn-red-f">
            {{ scope.row.mobilePhone }}
          </div>
          <div v-else-if="scope.row.statusCd == '401400'" class="warn-orange-f">
            {{ scope.row.mobilePhone }}
          </div>
          <div v-else-if="scope.row.statusCd == '401498'" class="warn-orange-f">
            {{ scope.row.mobilePhone }}
          </div>
          <div
            v-else-if="scope.row.statusCd == '9005002'"
            class="warn-orange-f"
          >
            {{ scope.row.mobilePhone }}
          </div>
          <div v-else-if="scope.row.statusCd == '300000'" class="warn-green-f">
            {{ scope.row.mobilePhone }}
          </div>
          <div v-else-if="scope.row.statusCd == '300098'" class="warn-blue-f">
            {{ scope.row.mobilePhone }}
          </div>
          <div v-else class="warn-normail">{{ scope.row.mobilePhone }}</div>
        </template>
      </el-table-column>
      <el-table-column label="甲端装机地址" width="400">
        <template slot-scope="scope">
          <div v-if="scope.row.statusCd == '401300'" class="warn-red-f">
            {{ scope.row.addressDesc }}
          </div>
          <div v-else-if="scope.row.statusCd == '401400'" class="warn-orange-f">
            {{ scope.row.addressDesc }}
          </div>
          <div v-else-if="scope.row.statusCd == '401498'" class="warn-orange-f">
            {{ scope.row.addressDesc }}
          </div>
          <div
            v-else-if="scope.row.statusCd == '9005002'"
            class="warn-orange-f"
          >
            {{ scope.row.addressDesc }}
          </div>
          <div v-else-if="scope.row.statusCd == '300000'" class="warn-green-f">
            {{ scope.row.addressDesc }}
          </div>
          <div v-else-if="scope.row.statusCd == '300098'" class="warn-blue-f">
            {{ scope.row.addressDesc }}
          </div>
          <div v-else class="warn-normail">{{ scope.row.addressDesc }}</div>
        </template>
      </el-table-column>
      <el-table-column label="乙端用户名称" width="200">
        <template slot-scope="scope">
          <div v-if="scope.row.statusCd == '401300'" class="warn-red-f">
            {{ scope.row.zUseCustName }}
          </div>
          <div v-else-if="scope.row.statusCd == '401400'" class="warn-orange-f">
            {{ scope.row.zUseCustName }}
          </div>
          <div v-else-if="scope.row.statusCd == '401498'" class="warn-orange-f">
            {{ scope.row.zUseCustName }}
          </div>
          <div
            v-else-if="scope.row.statusCd == '9005002'"
            class="warn-orange-f"
          >
            {{ scope.row.zUseCustName }}
          </div>
          <div v-else-if="scope.row.statusCd == '300000'" class="warn-green-f">
            {{ scope.row.zUseCustName }}
          </div>
          <div v-else-if="scope.row.statusCd == '300098'" class="warn-blue-f">
            {{ scope.row.zUseCustName }}
          </div>
          <div v-else class="warn-normail">{{ scope.row.zUseCustName }}</div>
        </template>
      </el-table-column>
      <el-table-column label="乙端联系人" width="100">
        <template slot-scope="scope">
          <div v-if="scope.row.statusCd == '401300'" class="warn-red-f">
            {{ scope.row.zContactName }}
          </div>
          <div v-else-if="scope.row.statusCd == '401400'" class="warn-orange-f">
            {{ scope.row.zContactName }}
          </div>
          <div v-else-if="scope.row.statusCd == '401498'" class="warn-orange-f">
            {{ scope.row.zContactName }}
          </div>
          <div
            v-else-if="scope.row.statusCd == '9005002'"
            class="warn-orange-f"
          >
            {{ scope.row.zContactName }}
          </div>
          <div v-else-if="scope.row.statusCd == '300000'" class="warn-green-f">
            {{ scope.row.zContactName }}
          </div>
          <div v-else-if="scope.row.statusCd == '300098'" class="warn-blue-f">
            {{ scope.row.zContactName }}
          </div>
          <div v-else class="warn-normail">{{ scope.row.zContactName }}</div>
        </template>
      </el-table-column>
      <el-table-column label="乙端联系电话" width="200">
        <template slot-scope="scope">
          <div v-if="scope.row.statusCd == '401300'" class="warn-red-f">
            {{ scope.row.zMobilePhone }}
          </div>
          <div v-else-if="scope.row.statusCd == '401400'" class="warn-orange-f">
            {{ scope.row.zMobilePhone }}
          </div>
          <div v-else-if="scope.row.statusCd == '401498'" class="warn-orange-f">
            {{ scope.row.zMobilePhone }}
          </div>
          <div
            v-else-if="scope.row.statusCd == '9005002'"
            class="warn-orange-f"
          >
            {{ scope.row.zMobilePhone }}
          </div>
          <div v-else-if="scope.row.statusCd == '300000'" class="warn-green-f">
            {{ scope.row.zMobilePhone }}
          </div>
          <div v-else-if="scope.row.statusCd == '300098'" class="warn-blue-f">
            {{ scope.row.zMobilePhone }}
          </div>
          <div v-else class="warn-normail">{{ scope.row.zMobilePhone }}</div>
        </template>
      </el-table-column>
      <el-table-column label="乙端装机地址" width="400">
        <template slot-scope="scope">
          <div v-if="scope.row.statusCd == '401300'" class="warn-red-f">
            {{ scope.row.zAddressDesc }}
          </div>
          <div v-else-if="scope.row.statusCd == '401400'" class="warn-orange-f">
            {{ scope.row.zAddressDesc }}
          </div>
          <div v-else-if="scope.row.statusCd == '401498'" class="warn-orange-f">
            {{ scope.row.zAddressDesc }}
          </div>
          <div v-else-if="scope.row.statusCd == '9005002'" class="warn-orange-f">
            {{ scope.row.zAddressDesc }}
          </div>
          <div v-else-if="scope.row.statusCd == '300000'" class="warn-green-f">
            {{ scope.row.zAddressDesc }}
          </div>
          <div v-else-if="scope.row.statusCd == '300098'" class="warn-blue-f">
            {{ scope.row.zAddressDesc }}
          </div>
          <div v-else class="warn-normail">{{ scope.row.zAddressDesc }}</div>
        </template>
      </el-table-column>
      <el-table-column label="速率" width="100">
        <template slot-scope="scope">
          <div v-if="scope.row.statusCd == '401300'" class="warn-red-f">
            {{ scope.row.rate }}
          </div>
          <div v-else-if="scope.row.statusCd == '401400'" class="warn-orange-f">
            {{ scope.row.rate }}
          </div>
          <div v-else-if="scope.row.statusCd == '401498'" class="warn-orange-f">
            {{ scope.row.rate }}
          </div>
          <div v-else-if="scope.row.statusCd == '9005002'" class="warn-orange-f">
            {{ scope.row.rate }}
          </div>
          <div v-else-if="scope.row.statusCd == '300000'" class="warn-green-f">
            {{ scope.row.rate }}
          </div>
          <div v-else-if="scope.row.statusCd == '300098'" class="warn-blue-f">
            {{ scope.row.rate }}
          </div>
          <div v-else class="warn-normail">{{ scope.row.rate }}</div>
        </template>
      </el-table-column>
    </el-table>
    <!-- 分页 -->
    <el-row style="margin-top: 0.1rem">
      <el-col :span="24">
        <ul class="clearfix ne-exp">
          <li class="left flex">
            <p class="warn-red"></p>
            <span>停开</span>
          </li>
          <li class="left flex">
            <p class="warn-orange"></p>
            <span>已退单、退单中、资源预占失败</span>
          </li>
          <!-- <li class="left flex">
            <p class="warn-purple"></p>
            <span>加急</span>
          </li> -->
          <li class="left flex">
            <p class="warn-green"></p>
            <span>竣工</span>
          </li>
          <li class="left flex">
            <p class="warn-blue"></p>
            <span>起租</span>
          </li>
        </ul>
      </el-col>
    </el-row>
    <el-row type="flex" class="row-bg mar-15" justify="center">
      <el-col :span="10">
        <vxe-pager
          background
          align="center"
          :current-page="currentPage"
          :total="totalCount"
          :page-size="pageSize"
          :page-sizes="[10, 20, 30, 50, 100, 200]"
          :layouts="[
            'PrevJump',
            'PrevPage',
            'JumpNumber',
            'NextPage',
            'NextJump',
            'Sizes',
            'FullJump',
            'Total',
          ]"
          @page-change="handlePageChange"
        >
        </vxe-pager>
      </el-col>
    </el-row>
    <el-dialog
      class="ne-pending-task"
      append-to-body
      :width="isContent.width"
      :top="isContent.top"
      :title="isContent.title"
      v-if="pendItemVisible"
      :close-on-click-modal="false"
      :visible.sync="pendItemVisible"
    >
      <component
        :show.sync="pendItemVisible"
        :is="isContent.content"
        @close="fun"
        @refreshList="searchFun"
        :ODKInfo="isContent.ODKInfo"
        :CTOInfo="isContent.CTOInfo"
        @changeWindow="changeWindow"
      ></component>
    </el-dialog>
  </div>
</template>

<script>
// import TariffVerification from "@/components/custorder/pengding/TariffVerification";
import TariffVerification from "@/components/custorder/zfhs";
// import ResourceSurvey from '@/components/custorder/pengding/ResourceSurvey';
import DoCommonTask from "@/components/custorder/pengding/DoCommonTask";
// import TariffVerification from '@/components/custorder/pengding/Aa_ppm_p/TariffVerification';
import ResourceSurvey from "@/components/custorder/ResourceFilling.vue";
// import DoCommonTask from '@/components/custorder/pengding/Aa_ppm_p/DoCommonTask';
import Rent from "@/components/custorder/pengding/Rent";
// import ModifyScheme from "@/components/custorder/pengding/ModifyScheme";
import ConfirmOutbound from "@/components/custorder/pengding/ConfirmOutbound";
import CustOrderService from "@/api/order/CustOrderService";
import OrderManager from "@/components/custorder/pengding/OrderManager";
import OrderManagerY from "@/components/custorder/OrderManagerY";
import ChargeUpdate from "@/components/custorder/ChargeUpdate";
import MonthChargeUpdate from "@/components/custorder/MonthChargeUpdate";
import ReFillBalance from "@/components/custorder/ReFillBalance";
import AuditBackOrder from "@/components/custorder/AuditBackOrder";
import AuditBackOrderOtn from "@/components/custorder/AuditBackOrderOtn";
import confirmCharge from "@/components/custorder/confirmCharge";
import DeletePage from "@/components/custorder/DeletePage";
import GenerateBillList from "@/components/custorder/pengding/GenerateBillList";
import saveBalanceMoney from "@/components/custorder/pengding/saveBalanceMoney";
import { constant } from "@/utils/constant";
import OrderService from "@/api/order/OrderService.js";
import OrderFiles from "@/components/custorder/OrderFiles";
import OrderApplyBack from "@/components/custorder/OrderApplyBack";
import LogChange from "@/components/custorder/examine/LogChange";
import OverseasScheme from "@/components/custorder/examine/OverseasScheme";
import circuitWarnInfo from "@/components/custorder/circuitWarnInfo";
import solutionWarningInfo from "@/components/custorder/solutionWarningInfo";
import returnLog from "@/components/order/returnLog/index";
import testReport from "@/components/order/testReport/index";
import PauseRent from "@/components/custorder/PauseRent";
import PauseRentConfirm from "@/components/custorder/PauseRentConfirm";
import qcbj from "@/components/custorder/qcbj";
import zfhs from "@/components/custorder/zfhs";
import zfhsSelectNode from "@/components/custorder/zfhsSelectNode";
import SelectNode from "@/components/custorder/SelectNode";
import AqryOrderTaskList from "@/components/custorder/AqryOrderTaskList";

import ResourceFilling from "@/components/custorder/ResourceFilling";

import { mapState, mapActions, mapGetters } from "vuex";

import AsalesGoodsMonthRentaFee from "@/components/custorder/pengding/AsalesGoodsMonthRentaFee";
import FillInPropose from "@/components/custorder/pengding/fillInPropose";
import progressChart from "@/components/custorder/progress-chart/index";
import chargeInfo from "@/components/custorder/pengding/chargeInfo";
import verifyFees from "@/components/custorder/verifyFees";
import reqActivationOrder from "@/components/custorder/pengding/reqActivationOrder/index";
import demandConfirm from "@/components/custorder/pengding/demandConfirm/index";
import UploadIdeaFiles from "@/components/custorder/examine/UploadIdeaFiles";
// FIX_WHQ:批量修改需求单信息
import PPMBatchEditDemand from "@/views/order/batch-edits/PPMBatchEditDemand.vue"
// FIX_WHQ:批量修改订单信息
import PPMBatchEditOrder from "@/views/order/batch-edits/PPMBatchEditOrder.vue"
// FIX_WHQ:批量修改订单要求完成时间
import BatchEditReqDate from "@/views/order/batch-edits/BatchEditReqDate.vue"

import reportInfo from "@/components/order/checkReport/index";

import { Loading } from "element-ui";
import OrderDelayRent from "@/components/custorder/OrderDelayRent";
export default {
  name: "OrderItemList",
  data() {
    return {
      // 批量修改订单要求完成日期弹框控制属性
      chaDateVisible: false,
      chadate: "",
      loading: false,
      //调用规则平台返回值
      callRuleRtnCode: 0,
      lookListData: [
        { title: "变更日志", content: "LogChange" },
        { title: "退单日志", content: "returnLog" },
        { title: "前置校验信息", content: "" },
        { title: "暂停起租原因", content: "" },
        { title: "评估结果", content: "" },
        { title: "附件", content: "OrderFiles" },
        { title: "收款单位确认日志", content: "chargeInfo" },
        { title: "查看境外方案", content: "OverseasScheme" },
        { title: "添加一次性调账单", content: "" },
        { title: "完成期限变更确认信息", content: "" },
        { title: "A端预起租确认日志", content: "AqryOrderTaskList" },
        { title: "查看电路开通进度", content: "progressChart" },
        { title: "查看B端业务挂起日志", content: "" },
        { title: "云提IP地址变更日志", content: "" },
        { title: "网分退单日志", content: "" },
        { title: "电路预警信息", content: "solutionWarningInfo" },
        { title: "端到端方案", content: "" },
        { title: "超时竣工电路原因", content: "circuitWarnInfo" },
        { title: "查询服开详细流程进度", content: "" },
      ],
      baseValue: "",
      tableData: [],
      filterMode: 1,
      selectValue: {
        value: 1,
        label: "电路代号/设备号",
        type: 0,
      },
      lastStateCdValue: "",
      baseOptions: [
        {
          value: 1,
          label: "电路代号/设备号",
          type: 0,
        },
        {
          value: 2,
          label: "产品名称",
          type: 0,
        },
        {
          value: 3,
          label: "通达地点",
          type: 0,
        },
        {
          value: 4,
          label: "登记事项",
          type: 1,
        },
        {
          value: 5,
          label: "单据状态",
          type: 1,
        },
        {
          value: 6,
          label: "基本速率",
          type: 0,
        },
      ],
      lastStateCdOptions: [
        {
          value: "200000",
          label: "正常",
        },
        {
          value: "300000",
          label: "竣工",
        },
        {
          value: "300098",
          label: "起租",
        },
        {
          value: "401300",
          label: "停开",
        },
        {
          value: "401400",
          label: "已退单",
        },
      ],
      serviceOfferNameValue: "",
      serviceOfferNameOptions: [
        {
          value: "4010100000",
          label: "新装",
        },
        {
          value: "4040098061",
          label: "补单",
        },
        {
          value: "4040100090",
          label: "起租日期变更",
        },
        {
          value: "4040100027",
          label: "起租",
        },
        {
          value: "4041000000",
          label: "地址变更",
        },
        {
          value: "4040300001",
          label: "财务变更",
        },
        {
          value: "4020100000",
          label: "拆机",
        },
        {
          value: "4040100022",
          label: "站点路由数变更",
        },
        {
          value: "4040100018",
          label: "QOS等级数变更",
        },
        {
          value: "4040100005",
          label: "提质",
        },
        {
          value: "4040100011",
          label: "网络拓扑变更",
        },
        {
          value: "4040100025",
          label: "站点可用率变更",
        },
        {
          value: "4040100098",
          label: "其它业务变更",
        },
        {
          value: "5010200000",
          label: "要求完成日期变更",
        },
        {
          value: "4060100000",
          label: "暂停",
        },
        {
          value: "4070100000",
          label: "复通",
        },
        {
          value: "4040100028",
          label: "收费方式变更",
        },
        {
          value: "4040100078",
          label: "业务信息变更",
        },
        {
          value: "4040100009",
          label: "退租日期变更",
        },
        {
          value: "4040100041",
          label: "IP地址变更",
        },
        {
          value: "4040700002",
          label: "成员退出",
        },
        {
          value: "4040100054",
          label: "月限额变更",
        },
        {
          value: "4040100030",
          label: "退出一点收费",
        },
        {
          value: "4040100050",
          label: "IP地址数量变更",
        },
        {
          value: "4041000001",
          label: "速率变更",
        },
        {
          value: "4040100016",
          label: "NNI逻辑子端口号变更",
        },
        {
          value: "4040100020",
          label: "双电路承载方式变更",
        },
        {
          value: "4040098021",
          label: "帐目项变更",
        },
        {
          value: "4040098026",
          label: "逻辑链路数/MAC地址总数变更",
        },
        {
          value: "4040098031",
          label: "短号长度变更",
        },
        {
          value: "4040098041",
          label: "资源续占变更",
        },
        {
          value: "4040100091",
          label: "长短号关系变更",
        },
        {
          value: "4040098042",
          label: "电力变更",
        },
        {
          value: "4040098043",
          label: "机房面积变更",
        },
        {
          value: "4040900001",
          label: "PE接口速率变更",
        },
        {
          value: "4040900003",
          label: "VRF接入电路速率变更",
        },
        {
          value: "4040100065",
          label: "设备信息变更",
        },
        {
          value: "4040100052",
          label: "端口变更",
        },
      ],
      isContent: "",
      pendItemVisible: false,
      // pendingListData: [
      // 	{ title: "填报竣工", content: "posCustomer" },
      // 	{ title: "电路竣工处理", content: "posCustomer" },
      // ],
      pendingListData: [],

      operatingList: [
        { id: 1, name: "任务1" },
        { id: 2, name: "任务2" },
        { id: 3, name: "任务3" },
      ],
      dealwithList: [
        { id: 1, name: "任务1" },
        { id: 2, name: "任务2" },
        { id: 3, name: "任务3" },
      ],
      outputList: [
        { id: 1, name: "任务1" },
        { id: 2, name: "任务2" },
        { id: 3, name: "任务3" },
      ],
      operateWithData: [],
      dealWithData: [],
      outputWithData: [],
      selectedItems: [],
      Constant: {},
      YWTZD: "业务通知单",
    };
  },
  mounted() {},
  components: {
    // ModifyScheme,
    UploadIdeaFiles,
    saveBalanceMoney,
    ResourceSurvey,
    TariffVerification,
    Rent,
    DoCommonTask,
    ConfirmOutbound,
    OrderManager,
    OrderManagerY,
    ReFillBalance,
    AuditBackOrder,
    AuditBackOrderOtn,
    ChargeUpdate,
    MonthChargeUpdate,
    DeletePage,
    GenerateBillList,
    OrderFiles,
    OrderApplyBack,
    LogChange,
    circuitWarnInfo,
    solutionWarningInfo,
    returnLog,
    testReport,
    OverseasScheme,
    confirmCharge,
    PauseRent,
    PauseRentConfirm,
    qcbj,
    zfhs,
    ResourceFilling,
    zfhsSelectNode,
    SelectNode,
    AqryOrderTaskList,
    AsalesGoodsMonthRentaFee,
    FillInPropose,
    progressChart,
    reqActivationOrder,
    chargeInfo,
    verifyFees,
    demandConfirm,
    reportInfo,
    OrderDelayRent,
    PPMBatchEditDemand,
    PPMBatchEditOrder,
    BatchEditReqDate,
  },
  props: {
    custorder: {
      type: Object,
      default: () => {
        return {};
      },
    },
  },
  computed: {
    ...mapState("orders", ["orderItemList"]),
    ...mapState("orders", ["orderRowCount"]),
    ...mapState("user", ["user"]),
    ...mapGetters(["conditions"]),
    ...mapState("orders", ["statusCdParams"]),
    currentPage() {
      if (this.orderRowCount == "null") {
        if (this.orderRowCount.pageIndex == "null") {
          return 1;
        } else {
          return Number(this.orderRowCount.pageIndex);
        }
        return 1;
      } else {
        return Number(this.orderRowCount.pageIndex);
      }
    },
    pageSize() {
      if (this.orderRowCount == "null") {
        if (this.orderRowCount.pageSize == "null") {
          return 1;
        } else {
          return Number(this.orderRowCount.pageSize);
        }
        return 1;
      } else {
        return Number(this.orderRowCount.pageSize);
      }
    },
    totalCount() {
      if (this.orderRowCount == "null") {
        if (this.orderRowCount.rowCount == "null") {
          return 0;
        } else {
          return Number(this.orderRowCount.rowCount);
        }
        return 0;
      } else {
        return Number(this.orderRowCount.rowCount);
      }
    },
  },
  methods: {
    ...mapActions("orders", [
      "qryPendingOrderList",
      "clearQryConditions",
      "qryPendingOrderItemList",
      "qryPendingOrderTree",
    ]),
    async searchFun() {
      let params = JSON.parse(localStorage.getItem("selectCardCondition"));
      params.pageInfo.pageIndex = 1;
      params.pageInfo.pageSize = 5;
      if (this.selectValue.type == 0 && this.baseValue) {
        params.qryType = this.selectValue.value;
        params.qryValue = this.baseValue;
      } else if (
        this.selectValue.type == 1 &&
        this.selectValue.value == 5 &&
        this.lastStateCdValue.value
      ) {
        params.qryType = this.selectValue.value;
        params.qryValue = this.lastStateCdValue.value;
      } else if (
        this.selectValue.type == 1 &&
        this.selectValue.value == 4 &&
        this.serviceOfferNameValue.value
      ) {
        params.qryType = this.selectValue.value;
        params.qryValue = this.serviceOfferNameValue.value;
      } else {
        delete params.qryType;
        delete params.qryValue;
      }
      localStorage.setItem("selectCardCondition", JSON.stringify(params));
      this.loading = true;
      await this.qryPendingOrderItemList(params);
      this.loading = false;
    },
    openLookPendDialog(item2, CTOInfo) {
      this.isContent = {
        title: item2.title,
        ODKInfo: {},
        CTOInfo: CTOInfo,
        content: item2.content,
        width: "98%",
        top: "2vh",
      };
      //附件菜单单独处理下数据
      if (item2.content == "OrderFiles") {
        this.isContent.width = "56%";
        this.isContent.CTOInfo = [CTOInfo];
        this.isContent.ODKInfo.sysource = "2";
      }
      this.pendItemVisible = true;
    },

    openUploadFile(CTOInfo) {
      this.isContent = {
        title: "附件",
        ODKInfo: {},
        CTOInfo: [CTOInfo],
        content: "OrderFiles",
        width: "56%",
        top: "2vh",
      };
      this.isContent.ODKInfo.sysource = "2";

      this.pendItemVisible = true;
    },

    changeWindow(taskId, content, nodeName) {
      this.isContent.ODKInfo.taskId = taskId;
      this.isContent.ODKInfo.nodeName = nodeName;
      this.isContent.content = content;
      this.isContent.width = "95%";
    },
    fun() {
      this.pendItemVisible = false;
      var condition = localStorage.getItem("selectCardCondition");
      this.qryPendingOrderItemList(JSON.parse(condition));
    },
    // 流程图跳转
    async toFlowChart(row) {
      const result = await CustOrderService.getFlowInst({
        orderItemId: row.orderItemId,
      });
      let flowInfo = {
        processInstanceId: result.meta.FLOW_INST_ID,
        custSoNumber: row.custSoNumber,
        serviceOfferName: row.serviceOfferName,
        prodName: row.prodName,
        orderItemSeq:
          row.orderItemSeq != undefined && row.orderItemSeq != ""
            ? row.orderItemSeq
            : "",
      };
      sessionStorage.setItem("flowInfo", JSON.stringify(flowInfo));
      // this.$router.push({
      //   name: "flowChart",
      //   params: { id: result.meta.FLOW_INST_ID },
      // });
      window.open(`orders.html?router=flowChart`, "_blank");
    },
    // 待处理显示时事件
    async dealTaskEvent(item) {
      let { orderItemId, orderAuditId, custId } = item;
      // 临时

      let usersMsg = {
        acceptUserId: this.user.staffId,
        acceptUserOrg: this.user.orgId,
        systemUserId: this.user.acctId,
        dealType: 234,
        custId: custId,
      };
      // 工单级别dealType:1 销售品级别dealType:234

      const result = await CustOrderService.queryOrderItemDealTask({
        orderItemId,
        orderAuditId,
        ...usersMsg,
      });
      this.pendingListData = [];
      this.pendingListData = this.orderTaskHand(
        result.meta.orderItemDealTasks,
        item
      );
    },
    // 待处理list处理
    orderTaskHand(list, CTOInfo) {
      let content = [];
      list.map((item) => {
        let width = "";
        let top = "";
        if (item.taskUrl == "Rent") {
          width = "50%";
          top = "15vh";
        } else {
          width = "98%";
          top = "3vh";
        }
        content.push({
          title: item.taskName,
          ODKInfo: item,
          CTOInfo: CTOInfo,
          content: item.taskUrl,
          width: width,
          top: top,
        });
      });
      // 临时填报方案
      // content.push({
      //   title: '填报方案',
      //   content: 'ConfirmOutbound',
      //   width: "98%",
      //   top: "3vh"
      // });
      return content;
    },
    async dealShowEvent(type) {
      if (type == 1) {
        var res1 = await CustOrderService.queryOrderManager({
          funcType: 2,
          funcKind: 0,
          userId: "",
        });
        var res = res1.meta;
        this.operateWithData = this.dealTaskHand(res, this.selectedItems, type);
      } else if (type == 2) {
        var res1 = await CustOrderService.queryOrderManager({
          funcType: 2,
          funcKind: 1,
          userId: "",
        });
        var res = res1.meta;

        this.dealWithData = this.dealTaskHand(res, this.selectedItems, type);
      } else if (type == 3) {
        var res1 = await CustOrderService.queryOrderManager({
          funcType: 2,
          funcKind: 2,
          userId: "",
        });
        var res = res1.meta;
        this.outputWithData = this.dealTaskHand(res, this.selectedItems, type);
      }
    },
    // 待处理list处理
    dealTaskHand(list, CTOInfo, type) {
      let content = [];
      list.map((item) => {
        if (type == 1) {
          item.paramType = "OPER";
        } else if (type == 2) {
          item.paramType = "DEAL";
        } else if (type == 3) {
          item.paramType = "EXPORT";
        }

        let width = "";
        let top = "";
        if (
          item.taskUrl == "TariffVerification" ||
          item.taskUrl == "ResourceSurvey" ||
          item.taskUrl == "DoCommonTask"
        ) {
          width = "98%";
          top = "3vh";
        } else {
          width = "50%";
          top = "15vh";
        }
        content.push({
          title: item.ALIAS_NAME,
          ODKInfo: item,
          CTOInfo: CTOInfo,
          content: item.WEB_PAGE,
          width: width,
          top: top,
        });
      });
      return content;
    },

    // ----------------------------------------------------------openPendDialog-----------------------
    async openPendDialog(item) {
      debugger
      localStorage.setItem("custOrder_select", JSON.stringify(this.custorder));
      item.CTOInfo.custOrderType = this.custorder.custOrderType;
      if (item.content == "ConvertOrder") {
        //转订单校验
        var ruleParam = [
          {
            PUB_REQ: {
              TYPE: "GOVCRM.TASK.orderDealCheck",
            },
            TASK_Z_ORDER: {
              CUST_SO_NUMBER: item.ODKInfo.custSoNumber + "",
              CUST_ORDER_ID: item.ODKInfo.custOrderId + "",
              TASK_ID: item.ODKInfo.tacheTaskId + "",
              ORG_ID: this.user.orgId + "",

              LAST_STATE_CD: item.CTOInfo.lastStateCd + "",
              SERVICE_OFFER_ID: item.CTOInfo.serviceOfferId + "",
              OFFER_ID: item.CTOInfo.prodOfferId + "",
            },
          },
        ];
        //调用规则平台
        // const rescode = await OrderService.rulePlatfromCheckNew(ruleParam);
        await this.callRule(ruleParam);

        if (this.callRuleRtnCode == 2) {
          this.loading = false;
          return;
        }
        // 转订单
        this.convertOrder(item.ODKInfo, item.CTOInfo);
      } else if (item.content == "generateBill") {
        //生产收费单校验
        var ruleParam = [
          {
            PUB_REQ: {
              TYPE: "GOVCRM.TASK.orderDealCheck",
            },
            TASK_FEE_ORDER: {
              CUST_SO_NUMBER: item.ODKInfo.custSoNumber + "",
              CUST_ORDER_ID: item.ODKInfo.custOrderId + "",
              TASK_ID: item.ODKInfo.tacheTaskId + "",
              ORG_ID: this.user.orgId + "",
              LAST_STATE_CD: item.CTOInfo.lastStateCd + "",
              SERVICE_OFFER_ID: item.CTOInfo.serviceOfferId + "",
              OFFER_ID: item.CTOInfo.prodOfferId + "",
            },
          },
        ];
        //调用规则平台
        // const rescode = await OrderService.rulePlatfromCheckNew(ruleParam);
        await this.callRule(ruleParam);

        if (this.callRuleRtnCode == 2) {
          this.loading = false;
          return;
        }
        // 生成收费单
        this.saveGenerateBill(item);
      } else if (item.content == "GenerateBillList") {
        // 收费单送审核
        // 临时写死prodOfferId MSTP,回头删掉
        let prodOfferId = "10010021";
        let offerType = this.getOfferType(prodOfferId);
        this.isContent = item;
        this.isContent.CTOInfo = {
          offerType,
          prodOfferId,
          ...this.isContent.CTOInfo,
        };
        this.pendItemVisible = true;
      } else if (item.content == "JGJF") {
        //竣工交付

        var jOrderItemIds = "";
        var params = {};
        params.taskId = "TACHE00120001";
        params.userId = this.user.staffId;
        params.custId = this.custorder.custId;
        params.orderItemIds = item.CTOInfo.orderItemId;
        params.custOrderId = this.custorder.custOrderId;
        params.prodId = item.CTOInfo.prodId;
        params.templateType = "2002";

        var result = await CustOrderService.outputNoticeExcel(params);

        const blob = new Blob([result]);

        let fileName = "竣工交付.xls";
        if ("download" in document.createElement("a")) {
          const elink = document.createElement("a");
          elink.download = fileName;
          elink.style.display = "none";
          elink.href = URL.createObjectURL(blob);
          document.body.appendChild(elink);
          elink.click();
          URL.revokeObjectURL(elink.href);
          document.body.removeChild(elink);
        } else {
          navigator.msSaveBlob(blob, fileName);
        }

        if (result.type != "" && result.type != null) {
          var param = {};
          param.custSoNumber = item.CTOInfo.custSoNumber;
          param.processInstId = item.ODKInfo.processInstId;
          param.activityId = item.ODKInfo.activityInstId;
          param.orderItemId = item.CTOInfo.orderItemId;
          param.userId = this.user.staffId;
          param.oneOrmany = "one";
          param.taskId = item.ODKInfo.taskId;
          param.orderAuditId = item.CTOInfo.orderAuditId;
          param.custId = item.CTOInfo.custId;

          var result = await CustOrderService.doWorkItem(param);

          if (result.meta.resultCode == "0") {
            this.$confirm(result.meta.resultMsg, "提示", {
              confirmButtonText: "确定",
              showCancelButton: false,
              type: "success",
              center: true,
            });
          } else {
            this.$confirm(result.meta.resultMsg, "提示", {
              confirmButtonText: "确定",
              showCancelButton: false,
              type: "warn",
              center: true,
            });
          }
        }

        // this.$message({
        //   showClose: true,
        //   message: "code:" + result.code + "  msg:" + result.msg,
        //   type: "error",
        // });
      } else if (
        item.content == "A_BUSI_DELIVERY" ||
        item.content == "dealDgzAndWarnTask"
      ) {
        //A端业务交付确认
        var param = {};
        param.custSoNumber = item.CTOInfo.custSoNumber;
        param.processInstId = item.ODKInfo.processInstId;
        param.activityId = item.ODKInfo.activityInstId;
        param.orderItemId = item.CTOInfo.orderItemId;
        param.userId = this.user.staffId;
        param.oneOrmany = "one";
        param.taskId = item.ODKInfo.taskId;
        param.orderAuditId = item.CTOInfo.orderAuditId;
        param.custId = item.CTOInfo.custId;

        var result = await CustOrderService.doWorkItem(param);

        if (result.meta.resultCode == "0") {
          this.$confirm(result.meta.resultMsg, "提示", {
            confirmButtonText: "确定",
            showCancelButton: false,
            type: "success",
            center: true,
          });
        } else {
          this.$confirm(result.meta.resultMsg, "提示", {
            confirmButtonText: "确定",
            showCancelButton: false,
            type: "warn",
            center: true,
          });
        }
      } else if (item.content == "demandConfirm") {
        //需求单确认
        let ppmCondition = {
          offerId: item.CTOInfo.prodOfferId,
          productId: item.CTOInfo.prodId,
          prodName: item.CTOInfo.offerName,
          serviceOfferId: "-1", //新装所有产品固定值
          modType: "50200003", //新装所有产品固定值
          optionId: item.ODKInfo.taskId,
        };
        sessionStorage.setItem("ppmCondition", JSON.stringify(ppmCondition));
        sessionStorage.removeItem("proName");
        let result = await OrderService.getByProdId(ppmCondition);
        if (result.code == 200) {
          console.log("result:", result);
          if (result.meta && result.meta !== {}) {
            let proName = result.meta.catalogName + result.meta.tempId;
            sessionStorage.setItem("proName", proName);
          }
        }
        // sessionStorage.setItem("proName", "demandConfirmPPM");
        localStorage.setItem(
          "cacheInfo",
          JSON.stringify({
            productId: item.CTOInfo.prodId,
            taskId: item.ODKInfo.taskId,
            OrgId: this.user.orgId,
            orderItemIds: item.CTOInfo.orderItemId,
          })
        );
        this.isContent = item;
        this.pendItemVisible = true;
      } else {
        this.isContent = item;
        this.pendItemVisible = true;
      }
      this.loading = false;
    },
    // 生成预收费单
    async saveGenerateBill(item) {
      let base = {
          userId: this.user.staffId + "",
          oneOrmany: "one",
        },
        { taskId, orderAuditId } = item.ODKInfo,
        { custId, orderItemId, custSoNumber, custOrderId, prodOfferId } =
          item.CTOInfo,
        // 临时
        orderItemIds = orderItemId;
      prodOfferId = "10010021";
      // 临时写死prodOfferId MSTP,回头删掉
      let offerType = this.getOfferType(prodOfferId);
      let allParams = {
        custId,
        custSoNumber,
        orderItemIds,
        custOrderId,
        taskId,
        prodOfferId,
        offerType,
        orderAuditId,
        ...base,
      };

      const result = await CustOrderService.saveGenerateBill(allParams);
      // 查看收费单
      try {
        if (result.meta.resultCode == 0) {
          // 生成报价单成功
          this.isContent = item;
          this.isContent.CTOInfo = {
            offerType,
            prodOfferId,
            ...this.isContent.CTOInfo,
          };
          this.isContent.title = "收费单列表";
          this.isContent.content = "GenerateBillList";
        } else {
          this.$message({
            showClose: true,
            message: result.meta.resultMsg,
            type: "warn",
          });
        }
      } catch {
        this.$message({
          showClose: true,
          message: "code:" + result.code + "  msg:" + result.msg,
          type: "error",
        });
      }
    },
    isSameFun(arr1, arr2) {
      let t = false;
      arr1.forEach((item1) => {
        arr2.forEach((item2) => {
          if (item1 == item2) {
            t = true;
          }
        });
      });
      return t;
    },
    getOfferType(prodOfferId) {
      let gjyw = ["10010059", "10010060", "10010012", "10010013"],
        dkyw = [
          "10010064",
          "10010066",
          "10010019",
          "10010021",
          "10010022",
          "10010023",
          "10010024",
          "10010073",
          "10010058",
          "10010111",
          "12000201",
          "24011235",
        ],
        prodOfferIdArr = prodOfferId.split(","),
        offerType = null;
      if (this.isSameFun(prodOfferIdArr, gjyw)) {
        offerType = "gjyw";
      } else if (this.isSameFun(prodOfferIdArr, dkyw)) {
        offerType = "dkyw";
      } else if (offerType) {
        offerType = "other";
      }
      return offerType;
    },
    // 转订单
    async convertOrder(ODKInfo, CTOInfo) {
      let userId = this.user.staffId,
        { orderAuditId, taskId } = ODKInfo,
        { custId, custSoNumber, custOrderId, orderItemId, orderItemSeq } =
          CTOInfo,
        orderItemSeqs = orderItemSeq,
        orderItemIds = orderItemId,
        allParams = {
          userId,
          taskId,
          custOrderId,
          custSoNumber,
          orderAuditId,
          orderItemIds,
          custId,
          orderItemSeqs,
          ...{ paramType: "OFFER" },
        };
      // 当批量多条的时候，orderItemSeqs用逗号分隔，现在暂时只传一个
      let loadingInstance = Loading.service({ fullscreen: true });
      const result = await CustOrderService.handelConvertOrder(allParams);
      loadingInstance.close();
      try {
        if (result.meta.resultCode == 0) {
          // 转订单成功
          this.open();
          this.qryPendingOrderList({ ...this.conditions });
        } else {
          this.$message({
            showClose: true,
            message: result.meta.resultMsg,
            type: "error",
          });
        }
      } catch {
        this.$message({
          showClose: true,
          message: "code:" + result.code + "  msg:" + result.msg,
          type: "error",
        });
      }
    },

    //调用规则平台通用方法 lb
    async callRule(ruleParam) {
      this.callRuleRtnCode = 3;
      const result = await OrderService.rulePlatfromCheck(ruleParam);
      let ruleCode = result.code;
      let ruleMsg = result.msg;
      //直接通过校验
      if (ruleCode != 0) {
        //校验结果有警告或者拒绝，弹窗提示
        //图标样式
        let iconType = "warning";
        if (ruleCode == 2) {
          iconType = "error";
        }
        await this.$confirm(ruleMsg, "提示", {
          confirmButtonText: "确定",
          type: iconType,
        })
          .then(() => {})
          .catch(() => {});
      }
      this.callRuleRtnCode = ruleCode;
    },

    async bjAnchorFun(item) {
      if(item.CTOInfo.statusCd=='401498'&&item.ODKInfo.taskId!='TACHE10020001'){
        this.$message({
          message: '退单中的销售品,除审核退单其他都不能操作',
          type: 'warning'
        });
        return false;
      }
      this.loading = true;
      const result = await OrderService.executeSql({
        interFaceType: "ORDER",
        sqlId: 2021072702,
        paramStr: "staffId:" + this.user.staffId,
      });
      if (result.meta.resList.executeSqlResps[0].cn == "0") {
        if (
          item.ODKInfo.tacheId == "STACHE0021" ||
          item.ODKInfo.tacheId == "STACHE0027"
        ) {
          this.loading = false;
          // 报竣屏蔽
          this.$confirm(
            "此类电路已关闭CRM人工报竣，请到服开系统报竣!",
            "提示",
            {
              confirmButtonText: "确定",
              showCancelButton: false,
              type: "warning",
              center: true,
            }
          );
        } else {
          this.anchorFun(item);
        }
      } else if (result.meta.resList.executeSqlResps[0].cn == "1") {
        this.anchorFun(item);
      }
    },
    // 打开订单待处理任务时锚点判断
    async anchorFun(item) {
      /**
       * 参数说明
       * ODKInfo:{
            acceptType: "1"
            acceptUserId: "1"
            activityId: "TACHE00040003:a05b165e-c115-11eb-b117-525400bb686d"
            activityInstId: "TACHE00040003:a05b165e-c115-11eb-b117-525400bb686d"
            orderAuditId: "4125"
            orderSoNbr: "JT202100007935"
            processInstId: "93f2d163-c115-11eb-b117-525400bb686d"
            prodOfferId: "10010021"
            tacheId: "TACHE0004"
            tacheTaskId: "TACHE00040003"
            taskId: "TACHE00040003"
            taskName: "出口局资源调查"
            taskUrl: "ResourceSurvey"
            workItemInstId: "93f2d163-c115-11eb-b117-525400bb686d"
          };
       CTOInfo:{
          acceptDate: "2021-05-30 15:06:34"
          acceptLanId: "500181403"
          acceptRegionId: "500181403"
          addressDesc: "11"
          applyObjSpec: "10010021"
          batchNbr: "0"
          belongCustId: "80"
          busiManagerId: "100410"
          busiManagerName: "张子原"
          contactName: "11"
          createDate: "2021-05-30 15:06:34"
          createOrgId: "1944640"
          createPost: "0"
          createStaff: "1"
          custId: "80"
          custOrderId: "14280"
          custSoNumber: "JT202100007935"
          flowInstId: "93f2d163-c115-11eb-b117-525400bb686d"
          handleStateCd: "50030002"
          handleStateCdName: "需求单"
          lastStateCd: "50030002"
          lastStateCdName: "需求单"
          mainOrderItemFlag: "1"
          mobilePhone: ""
          objId: "18078"
          offerInstId: "13550"
          offerName: "MSTP"
          operType: "1200"
          ordProdInstId: "16733"
          orderAuditId: "4125"
          orderItemCd: "1200"
          orderItemId: "18084"
          orderItemObjId: "13550"
          orderItemSeq: "1"
          parOrderItemId: "18084"
          preHandleFlag: "1"
          priority: "80050032001"
          prodId: "80008007"
          prodInstId: "18078"
          prodName: "MSTP"
          prodOfferId: "10010021"
          rate: "580M"
          regionId: "500181403"
          regionRange: "北京-北京"
          reqAudDate: "2021-05-30 00:00:00"
          reqType: "80050034001"
          roleCd: "0"
          serviceOfferId: "4010100000"
          serviceOfferName: "新装"
          statusCd: "401300"
          statusChangeReason: "JT202100007945,订单审核更新同一销售品实例下的所有在途单更新为停开"
          statusDate: "2021-05-30 15:06:34"
          updateDate: "2021-05-30 15:06:55"
          useCustId: "80"
          useCustName: "邯郸美的制冷设备有限公司"
          verNum: "1"
          zAddressDesc: "11"
          zContactName: "11"
          zMobilePhone: ""
        }
       **/
      //待处理订单规则埋点
      var ruleParam = [
        {
          PUB_REQ: {
            TYPE: "GOVCRM.TASK.taskLevel",
          },
          // CUST: {
          //   CUST_ID: item.CTOInfo.custId + '',
          // },
          // ORDCOMMON: {
          //   STAFF_ID: this.user.staffId + '',
          //   ORG_ID: this.user.orgId + '',
          // },
          // ORDERTASK: {
          //   TASK_ID: item.ODKInfo.tacheTaskId + '',
          //   TACHE_ID: item.ODKInfo.tacheId + '',
          // },
          // SERVICEOFFER: {
          //   PRODUCT_ID: item.CTOInfo.prodId + '',
          //   PROD_OFFER_ID: item.CTOInfo.prodOfferId + '',
          //   SERVICE_OFFER_ID: item.CTOInfo.serviceOfferId + '',
          // },
          // ORDERITEM: {
          //   ORDER_ITEM_ID: item.CTOInfo.orderItemId + '',
          // },
          // ORDERITEMS: {
          //   ORDER_ITEM_IDS: item.CTOInfo.orderItemId + '',
          // },

          ORDER_AUDIT_CHECK: {
            CUST_ID: item.CTOInfo.custId + "",
            TASK_ID: item.ODKInfo.taskId + "",
            CUST_SO_NUMBER: item.CTOInfo.custSoNumber + "",
            BATCH_NO: item.CTOInfo.batchNbr + "",
            CUST_ORDER_TYPE: item.CTOInfo.custOrderType + "",
            TASK_ID2: item.ODKInfo.taskId + "",
            PRODUCT_ID: item.CTOInfo.prodId + "",
          },
        },
      ];
      //调用规则平台
      const result = await OrderService.rulePlatfromCheck(ruleParam);
      let ruleCode = result.code;
      let ruleMsg = result.msg;
      //直接通过校验
      if (ruleCode == 0) {
        //继续之前逻辑
        this.openPendDialog(item);
      } else {
        //校验结果有警告或者拒绝，弹窗提示
        //图标样式
        let iconType = "warning";
        if (ruleCode == 2) {
          iconType = "error";
        }
        this.$confirm(ruleMsg, "提示", {
          confirmButtonText: "确定",
          type: iconType,
        })
          .then(() => {
            //不是拒绝执行（提醒或异常）
            if (ruleCode != 2) {
              //继续之前逻辑
              this.openPendDialog(item);
            } else {
              this.loading = false;
            }
          })
          .catch(() => {
            this.loading = false;
          });
      }
    },

    openTopPendDialog(item, paramType) {
      localStorage.setItem("custOrder_select", JSON.stringify(this.custorder));

      this.isContent = item;
      this.dealOperation(paramType);
    },
    //top按钮的判断
    dealOperation: function (paramType) {
      var selectList = this.isContent.CTOInfo;
      this.orderDeal(paramType);
    },
    goDetailView: function (row) {
      //跳转产品详情
      sessionStorage.setItem("changeRow", JSON.stringify(row));
      // if(row.lastStateCd   50030002)
      const ppmCondition = {
        productId: row.prodId ? row.prodId : 80008007,
        serviceOfferId: "4010100000",
        modType: "50200003",
        optionId: "310", //需求单审核前后/订单审核前后/产品实例库  310，311，312，313，314
      };
      if (
        this.custorder.audState == "审核同意" &&
        row.lastStateCd == "50030002"
      ) {
        ppmCondition.optionId = "311";
      } else if (
        this.custorder.audState == "审核同意" &&
        row.lastStateCd == "50030003"
      ) {
        ppmCondition.optionId = "313";
      } else if (
        this.custorder.audState == "待送审核" &&
        row.lastStateCd == "50030003"
      ) {
        ppmCondition.optionId = "312";
      } else if (
        this.custorder.audState == "待审核" &&
        row.lastStateCd == "50030003"
      ) {
        ppmCondition.optionId = "313";
      } else if (
        this.custorder.audState == "待审核" &&
        row.lastStateCd == "50030002"
      ) {
        ppmCondition.optionId = "311";
      }
      sessionStorage.setItem("ppmCondition", JSON.stringify(ppmCondition));
      ppmCondition.audState = this.custorder.audState;
      sessionStorage.setItem("detailCondition", JSON.stringify(ppmCondition)); //解决详情刷新缓存请求条件被覆盖问题
      window.open("orders.html?router=productinfo", "_blank");
    },

    // -----------------------------------------orderDeal------
    async orderDeal(paramType) {
      var Constant = constant();
      var paramData = new Array();
      var orderItemIds = this.isContent.CTOInfo;
      if (orderItemIds.length == 0) {
        this.$confirm("请选择一条记录！", "提示", {
          confirmButtonText: "确定",
          showCancelButton: false,
          type: "warn",
          center: true,
        });
        return;
      }
      var funcCode = this.isContent.ODKInfo.FUNC_CODE;
      var SelRows = this.isContent.CTOInfo;
      var flag = true;

      var orderItemIds = [];
      var orderItemSeqs = [];
      for (var i = 0; i < SelRows.length; i++) {
        var o = SelRows[i];
        orderItemIds.push(o.orderItemId);
        orderItemSeqs.push(o.orderItemSeq);
        // 如果是停开和已经退单 所有的操作和待处理都不能处理
        if (
          Constant.ORDER_ITEM_STATUS_YCD == o["statusCd"] ||
          Constant.ORDER_ITEM_STATUS_YTD == o["statusCd"]
        ) {
          if ("OUTPUT_SERVICE_NOTICE" != funcCode) {
            this.$confirm("停开,已退单的销售品,不能进行操作!", "提示", {
              confirmButtonText: "确定",
              showCancelButton: false,
              type: "warn",
              center: true,
            });
            flag = false;
            return false;
          }
        }
        // 如果是退单中, 操作和输出不能进行操作
        if ("OPER" == paramType || "EXPORT" == paramType) {
          // 如果是退单中,那么除了审核退单任务可以处理 其他操作和任务都不能做处理
          if (Constant.ORDER_ITEM_STATUS_TDZ == o["statusCd"]) {
            if ("OUTPUT_SERVICE_NOTICE" != funcCode) {
              this.$confirm(
                "退单中的销售品,除审核退单其他都不能操作!",
                "提示",
                {
                  confirmButtonText: "确定",
                  showCancelButton: false,
                  type: "warn",
                  center: true,
                }
              );
              flag = false;
              return false;
            }
          }
        }

        var paramObj = new Object();
        paramObj.CUST_SO_NUMBER = o["CUST_SO_NUMBER"];
        paramObj.ORDER_ITEM_ID = o["ORDER_ITEM_ID"];
        paramObj.FLOW_INST_ID = o["FLOW_INST_ID"];
        paramObj.PRODUCT_ID = o["PRODUCT_ID"];
        paramObj.TASK_ID = funcCode;
        paramObj.BATCH_NBR = this.custorder.batchNbr;
        paramObj.CUST_ORDER_ID = this.custorder.custOrderId;
        paramObj.HANDLE_ORG_ID = this.custorder.handleOrgId;
        paramObj.ORDER_AUDIT_ID = this.custorder.orderAuditId;
        paramObj.PROD_OFFER_ID = o["prodOfferId"];
        paramObj.ORDER_ITEM_SEQ = o["ORDER_ITEM_SEQ"];
        paramObj.STATUS_CD = o["STATUS_CD"];
        paramObj.FLAG = "2";
        paramObj.ORDER_ITEM_SEQ = o["ORDER_ITEM_SEQ"];
        // 物联网需求 增加受理运营商ID add by shiyj 2015/11/30
        paramObj.ORDER_SOURCE_ID = this.custorder.orderSourceId;
        paramData.push(paramObj);
      }

      //校验订单操作处理规则埋点
      var customerDetail = await CustOrderService.qryCustomerOrder({
        custSoNumber: SelRows[0].custSoNumber,
        custId: SelRows[0].custId,
        pageInfo: {
          pageIndex: "1",
          pageSize: "10",
        },
      });

      var customerOrders = customerDetail.meta.customerOrders;
      var selectCustomer;
      if (customerOrders != null && customerOrders.length > 0) {
        selectCustomer = customerOrders[0];
      } else {
        selectCustomer = {};
        selectCustomer.sendFlag = "";
        selectCustomer.orderSourceId = "-1";
        selectCustomer.audResultFlag = "";
      }

      var ruleParam = [
        {
          PUB_REQ: {
            TYPE: "GOVCRM.TASK.orderDealCheck",
          },
          ORDER_ITEM_DEAL: {
            ORDER_ITEM_IDS: orderItemIds.join(",") + "",
            SUB_CODE: paramType + "",
            DEAL_CODE: funcCode + "",
            CUST_ID: SelRows[0].custId + "",
            STAFF_ID: this.user.staffId + "",
            ORG_ID: this.user.orgId + "",
            CUST_SO_NUMBER: SelRows[0].custSoNumber + "",
            ORDER_ITEM_SEQS: orderItemSeqs.join(",") + "",
            SEND_FLAG: selectCustomer.sendFlag + "",
            AUD_RESULT_FLAG: selectCustomer.audResultFlag + "",
            ORDER_SOURCE_ID: selectCustomer.orderSourceId + "",

            LAST_STATE_CD: SelRows[0].lastStateCd + "",
            SERVICE_OFFER_ID: SelRows[0].serviceOfferId + "",
            OFFER_ID: SelRows[0].prodOfferId + "",
            PRODUCT_ID1: SelRows[0].prodId + "",
            PRODUCT_ID2: SelRows[0].prodId + "",
          },
        },
      ];
      //调用规则平台
      // const rescode = await OrderService.rulePlatfromCheckNew(ruleParam);
      await this.callRule(ruleParam);

      if (this.callRuleRtnCode == 2) {
        return;
      }
      //设置订单信息缓存
      localStorage.setItem("custOrder_select", JSON.stringify(this.custorder));
      // custorder
      // 1.请求Action方式拼装的URL
      // var url = ctxPath + webPage;
      // 拼接的参数
      // var dataObj = "params=" + encodeURIComponent(JSON2.stringify(paramData));
      if (flag) {
        // 操作、
        if ("OPER" == paramType) {
          // 上传附件-向超(xc修改)
          if ("UPLOADFILE_OFFER" == funcCode) {
            if (this.selectedItems.length == 1) {
              this.isContent.ODKInfo.sysource = "2";
              this.pendItemVisible = true;
            } else {
              this.$confirm("不支持批量上传附件,请重新勾选!", "提示", {
                confirmButtonText: "确定",
                showCancelButton: false,
                type: "warn",
                center: true,
              });
            }

            // 海外升级
          } else if ("promote" == funcCode) {
          } else if (funcCode == "reportInfo") {
            console.log("reprotInfo");
            //查看进度报告
            this.isContent.width = "90%";
            this.pendItemVisible = true;
            return;
          } else if ("UPLOAD_ELEC_FILE_ORDER_ITEM" == funcCode) {
            // 上传电子文档
            // this.isContent.content = 'UploadIdeaFiles';
            this.isContent.width = "90%";
            this.isContent.top = "5vh";
            this.isContent.ODKInfo.level = "sale";
            this.pendItemVisible = true;
          } else if ("RE_FILL_BALANCE" == funcCode) {
            for (var i = 0; i < paramData.length; i++) {
              if (
                paramData[i].PROD_OFFER_ID != "10010076" &&
                paramData[i].PROD_OFFER_ID != "10010026" &&
                paramData[i].PROD_OFFER_ID != "10010073" &&
                paramData[i].PROD_OFFER_ID != "10010022" &&
                paramData[i].PROD_OFFER_ID != "10010064" &&
                paramData[i].PROD_OFFER_ID != "10010019" &&
                paramData[i].PROD_OFFER_ID != "10010066" &&
                paramData[i].PROD_OFFER_ID != "10010021"
              ) {
                this.$confirm("此产品不能重新填报决算金额!", "提示", {
                  confirmButtonText: "确定",
                  showCancelButton: false,
                  type: "warn",
                  center: true,
                });
                return;
              }
            }

            var selRowList = [];
            SelRows.forEach((item) => {
              item.audFirstId = selectCustomer.audFirstId;
              item.staffId = this.user.staffId;
              item.custOrderId = selectCustomer.custOrderId;
              selRowList.push(item);
            });

            var fillFlag = await CustOrderService.checkHasCreateBalance({
              mapList: selRowList,
            });
            if ((fillFlag.code = 200)) {
              // this.anchorFun(this.isContent.ODKInfo,this.isContent.CTOInfo);
              this.isContent.width = "95%";
              this.pendItemVisible = true;
              return;
            } else {
              this.$confirm(fillFlag.meta, "提示", {
                confirmButtonText: "确定",
                showCancelButton: false,
                type: "warn",
                center: true,
              });

              return false;
            }
            // 189/190关系绑定(单条)
          } else if ("RELATION_BOUND" == funcCode) {
            if (SelRows.length > 1) {
              this.$confirm("只能选择一条销售品进行关系绑定!", "提示", {
                confirmButtonText: "确定",
                showCancelButton: false,
                type: "warn",
                center: true,
              });

              return;
            }
            this.anchorFun(this.isContent.ODKInfo, this.isContent.CTOInfo);
            /*
             * 重新指定行业经理
             */
          } else if ("reSpeInduManager" == funcCode) {
            // 归档
          } else if ("DO_ARCHIVE_CHECK" == funcCode) {
            // 激活归档
            //  this.isContent = item;
            this.pendItemVisible = true;
            // 批量修改需求单信息/批量修改订单信息
            debugger;
          } else if ("MOD_ORDER_OFFICE" == funcCode) {
            // FIX_WHQ:批量修改订单
            this.isContent.content='PPMBatchEditOrder',
            this.isContent.width = "90%";
            this.pendItemVisible = true;
          } else if ("MOD_OFFICE" == funcCode) {
            // FIX_WHQ:批量修改需求单
            this.isContent.content='PPMBatchEditDemand',
            this.isContent.width = "90%";
            this.pendItemVisible = true;
          } else if ("CHA_DATE" == funcCode) {
            // FIX_WHQ:批量修改订单要求完成时间 
            this.isContent.content='BatchEditReqDate',
            this.isContent.width = "30%";
            this.pendItemVisible = true;
            // 月租收款单位修改
          } else if ("UPDATE_CHARGE_CODE" == funcCode) {
            var reqMap = {
              list: this.isContent.CTOInfo,
              funcCode: funcCode,
            };
            var flag = await CustOrderService.checkChargeOrg(reqMap);

            if (flag.code != 200) {
              this.$confirm(flag.meta, "提示", {
                confirmButtonText: "确定",
                showCancelButton: false,
                type: "warn",
                center: true,
              });
              return false;
            } else {
              // this.anchorFun(this.isContent.ODKInfo,this.isContent.CTOInfo);
            }
            this.pendItemVisible = true;
            return;
            // 一次性收款单位修改
          } else if ("UPDATE_CHARGE_BY_ONCE" == funcCode) {
            var reqMap = {
              list: this.isContent.CTOInfo,
              funcCode: funcCode,
            };
            var flag = await CustOrderService.checkChargeOrg(reqMap);
            if (flag.code != 200) {
              this.$confirm(flag.meta, "提示", {
                confirmButtonText: "确定",
                showCancelButton: false,
                type: "warn",
                center: true,
              });
              return false;
            } else {
              // this.anchorFun(this.isContent.ODKInfo,this.isContent.CTOInfo);
            }
            this.pendItemVisible = true;
            return;
            // 退回需求单
          } else if ("BACK_OFFER_REQ_ORDER" == funcCode) {
            console.log("this.custorder:", this.custorder);
            console.log("this.isContent.CTOInfo:", this.isContent.CTOInfo);
            var custSoNumber = this.custorder.custSoNumber;
            var orderItemIds = "";
            for (var i = 0; i < this.selectedItems.length; i++) {
              if (i == 0) {
                orderItemIds = this.selectedItems[i].orderItemId;
              } else {
                orderItemIds += "," + this.selectedItems[i].orderItemId;
              }
            }
            var orderItemSeqs = "";
            for (var j = 0; j < this.isContent.CTOInfo.length; j++) {
              if (j == 0) {
                orderItemSeqs = this.isContent.CTOInfo[j].orderItemSeq;
              } else {
                orderItemSeqs += "," + this.isContent.CTOInfo[j].orderItemSeq;
              }
            }
            let param = {};
            param.orderItemIds = orderItemIds;
            param.orderItemSeqs = orderItemSeqs;
            param.custSoNumber = custSoNumber;
            let result = this.validateRtnBackOrder(param);
            if (result == true) {
              //调用流程回退接口
              var res = await CustOrderService.rtnReqOrde(param);
              if (res.meta.resultCode == "0") {
                this.$message({
                  type: "success",
                  message: "保存成功!",
                });
              } else {
                this.$message({
                  showClose: true,
                  message: res.meta.resultMsg,
                  type: "error",
                });
              }
            }

            return;

            // 反馈售前售中支撑情况
          } else if (
            "FKSQ" == funcCode ||
            "FKSZ" == funcCode ||
            "FKSQ_BTCH" == funcCode ||
            "FKSZ_BTCH" == funcCode
          ) {
          } else if ("HWMYD" == funcCode) {
            // 延时起租
          } else if ("YQQZ" == funcCode) {
            this.pendItemVisible = true;
            // 暂停起租
          } else if ("ZTQZ" == funcCode) {
            this.pendItemVisible = true;
          } else if ("ZTQZQY" == funcCode) {
            this.pendItemVisible = true;
            /*begin 0006676 add by wjb 2014-05-16*/
            //暂停起租确认  批量
            /*end 0006676 add by wjb 2014-05-16*/
            // 重新核实资费
          } else if ("RE_CHARGES" == funcCode) {
            if (this.selectedItems.length == 1) {
              this.pendItemVisible = true;
            } else {
              this.$confirm("不支持处理,请勾选一条数据!", "提示", {
                confirmButtonText: "确定",
                showCancelButton: false,
                type: "warn",
                center: true,
              });
            }
            // 删除订单项
          } else if ("DELETE_OFFER" == funcCode) {
            var batchNbr = this.custorder.batchNbr;
            if (batchNbr != "0") {
              var qryProdMap = {
                batchNbr: this.custorder.batchNbr,
                custOrderId: this.custorder.custOrderId,
              };
              var data = await CustOrderService.qryProdOfferNameReqType(
                qryProdMap
              );

              var resData = data.meta;
              var includeProdOfferIds =
                "10010096|11027575|10010034|10010081|" +
                "10010082|10010036|10010083|10010035";
              for (var i = 0; i < resData.length; i++) {
                var prod_offer_id = resData[i]["PROD_OFFER_ID"];
                if (
                  includeProdOfferIds.indexOf(prod_offer_id) > -1 &&
                  resData[0]["HANDLE_STATE_CD"] == "50030002"
                ) {
                  this.$message({
                    type: "warn",
                    message: "IDC产品只有需求单送审核前能删除订单信息！",
                  });
                  return;
                }
              }
            }

            var orderItemIds = "";
            for (var i = 0; i < this.selectedItems.length; i++) {
              if (i == 0) {
                orderItemIds = this.selectedItems[i].orderItemId;
              } else {
                orderItemIds += "," + this.selectedItems[i].orderItemId;
              }
            }

            var reqMap = {
              custOrderId: this.custorder.custOrderId,
              custSoNumber: this.custorder.custSoNumber,
              orderItemIds: orderItemIds,
              // batchNbr: this.custorder.batchNbr,
              modReason: "删除订单",
              staffId: this.user.staffId + "",
              custId: this.custorder.custId,
            };

            this.isContent.ODKInfo.reqMap = reqMap;
            this.isContent.ODKInfo.deleteType = "delProdOffer";
            this.isContent.content = "DeletePage";
            this.pendItemVisible = true;
            // this.anchorFun(this.isContent.ODKInfo,this.isContent.CTOInfo);
          } else if ("RETURNTOBUS" == funcCode) {
            // 获取协同通信反馈模板
          } else if ("CLOSE_ICT" == funcCode) {
          } else if ("XTTXEXPORT" == funcCode) {
            //军队客户入网信息表模版增加 add by LUKX
          } else if ("JW_RW_XX" == funcCode) {
            //挂起
          } else if ("HANG_UP" == funcCode) {
          } else if ("CANCEL_HANG_UP" == funcCode) {
          } else if ("APPLY_BACK_ORDER" == funcCode) {
            this.pendItemVisible = true;
          }
        } else if ("EXPORT" == paramType) {
          let templateType = null,
            xsName = "";
          // 输出
          if (funcCode == "EXPORT_OFFER_EXCEL") {
            //输出销售品列表
            let param = [];
            for (var i = 0; i < SelRows.length; i++) {
              var o = SelRows[i];
              var paramObj = new Object();
              paramObj.CUST_SO_NUMBER = o["custSoNumber"];
              paramObj.ORDER_ITEM_ID = o["orderItemId"];
              paramObj.FLOW_INST_ID = o["flowInstId"];
              paramObj.BATCH_NBR = o["batchNbr"];
              paramObj.ORDER_ITEM_SEQ = o["orderItemSeq"];
              paramObj.LAST_STATE_CD = o["lastStateCd"];
              paramObj.PRODUCT_ID = o["prodId"];
              paramObj.PROD_OFFER_ID = o["prodOfferId"];
              paramObj.PROD_OFFER_NAME = o["offerName"];
              paramObj.ORDER_DATE = o["orderDate"]; //---
              paramObj.SERVICE_OFFER_NAME = o["serviceOfferName"];
              paramObj.REGION_RANGE = o["regionRange"];
              paramObj.ACC_NBR = o["accNum"];
              paramObj.BUSI_MANAGER_NAME = o["busiManagerName"];
              paramObj.PROD_INST_NAME = o["useCustName"]; //---
              paramObj.ADDRESS_DESC = o["addressDesc"];
              paramObj.CONTACT_NAME = o["contactName"];
              paramObj.MOBILE_PHONE = o["mobilePhone"];
              paramObj.ROLE_CD = o["roleCd"];
              paramObj.RATE = o["rate"];
              paramObj.CUST_ORDER_ID = o["custOrderId"];
              paramObj.REQ_ORDER_DATE = o["reqOrderDate"];
              paramObj.SERVICE_OFFER_ID = o["serviceOfferId"];
              paramObj.FINISH_OPER_DATE = o["finishOperDate"]; //--
              paramObj.FINISH_TIME = o["firstFinishDate"]; //---
              paramObj.BEGIN_RENT_TIME = o["beginRentDate"]; //---
              paramObj.Z_CONTACT_NAME = o["zContactName"];
              paramObj.Z_MOBILE_PHONE = o["zMobilePhone"];
              paramObj.MOD_OLD_ORDER_NBR = o["modOldOrderNbr"]; //---
              paramObj.PROD_OFFER_INST_ID = o["offerInstId"];
              paramObj.ORDER_AUD_DATE = o["orderAudDate"]; //---
              paramObj.PN = o["prodName"];
              paramObj.Z_PROD_INST_NAME = o["zUseCustName"]; //---
              paramObj.Z_ADDRESS_DESC = o["zAddressDesc"];
              // 产品订单项状态
              var ORDER_ITEM_STATUS_SLZ = 100000; // 受理中 编码但不使用
              var ORDER_ITEM_STATUS_DSH = 101100; // 待审核 59 按集团规范改造
              var ORDER_ITEM_STATUS_DSF = 101200; // 待收费 50 按集团规范改造，同50已算费
              var ORDER_ITEM_STATUS_DQR = 101300; // 待确认 按集团规范改造，订单保存后即待确认状态
              var ORDER_ITEM_STATUS_ZC = 101398; // 暂存 省内扩充
              var ORDER_ITEM_STATUS_GDZ = 101397; // 改单中 53 省内扩充
              var ORDER_ITEM_STATUS_DXG = 101396; // 待修改 60 按集团规范改造
              var ORDER_ITEM_STATUS_LS = 101395; // 临时状态
              var ORDER_ITEM_STATUS_XQQR = 101400; // 客户需求确认 编码但不使用
              var ORDER_ITEM_STATUS_ZT = 200000; // 在途 编码但不使用
              var ORDER_ITEM_STATUS_ZJZ = 201100; // 质检中 编码但不使用
              var ORDER_ITEM_STATUS_HZ = 201200; // 缓装 14 按集团规范改造
              var ORDER_ITEM_STATUS_HZZ = 201298; // 缓装中 省内扩充
              var ORDER_ITEM_STATUS_HZKZZ = 201297; // 缓装开装中 55 省内扩充
              var ORDER_ITEM_STATUS_DFS = 201398; // 待发送 51 省内扩充
              var ORDER_ITEM_STATUS_KTZ = 201300; // 开通中 12 按集团规范改造，发送后即开通中
              var ORDER_ITEM_STATUS_YKT = 201400; // 已开通 编码但不使用
              var ORDER_ITEM_STATUS_DQRQZ = 201500; // 待确认起租 编码但不使用
              var ORDER_ITEM_STATUS_YQRQZ = 201600; // 已确认起租 编码但不使用
              var ORDER_ITEM_STATUS_JG = 300000; // 竣工 13 按集团规范改造
              var ORDER_ITEM_STATUS_JGZ = 301100; // 竣工中 57 按集团规范改造，同57待竣工
              var ORDER_ITEM_STATUS_YGD = 301200; // 已归档 编码但不使用
              var ORDER_ITEM_STATUS_YC = 400000; // 异常 58 按集团规范改造
              var ORDER_ITEM_STATUS_QDCW = 401100; // 前端错误 编码但不使用
              var ORDER_ITEM_STATUS_HDCW = 401200; // 后端错误 编码但不使用
              var ORDER_ITEM_STATUS_YCD = 401300; // 已撤单 15 按集团规范改造
              var ORDER_ITEM_STATUS_CDZ = 401398; // 撤单中 54
              var ORDER_ITEM_STATUS_YSC = 401397; // 已删除
              var ORDER_ITEM_STATUS_TDZ = 401498; // 退单中
              var ORDER_ITEM_STATUS_YTD = 401400; // 已退单 16 按集团规范改造
              var ORDER_ITEM_STATUS_QRDZ = 401500; // 确认待装中 编码但不使用
              var ORDER_ITEM_STATUS_DRKZ = 401600; // 确认开装中 编码但不使用
              var ORDER_ITEM_STATUS_DZZ = 401700; // 待装中 11 按集团规范改造
              var ORDER_ITEM_STATUS_WTZC = 105000;
              var ORDER_ITEM_STATUS_QZ = 300098; //起租

              if (ORDER_ITEM_STATUS_ZT == o["statusCd"]) {
                paramObj.STATUS_CD = "正常";
              } else if (ORDER_ITEM_STATUS_JG == o["statusCd"]) {
                paramObj.STATUS_CD = "竣工";
              } else if (ORDER_ITEM_STATUS_YGD == o["statusCd"]) {
                paramObj.STATUS_CD = "归档";
              } else if (ORDER_ITEM_STATUS_YCD == o["statusCd"]) {
                paramObj.STATUS_CD = "停开";
              } else if (ORDER_ITEM_STATUS_YTD == o["statusCd"]) {
                paramObj.STATUS_CD = "已退单";
              } else if (ORDER_ITEM_STATUS_TDZ == o["statusCd"]) {
                paramObj.STATUS_CD = "退单中";
              } else if (ORDER_ITEM_STATUS_ZC == o["statusCd"]) {
                paramObj.STATUS_CD = "暂存";
              } else if (ORDER_ITEM_STATUS_QZ == o["statusCd"]) {
                paramObj.STATUS_CD = "起租";
              } else if (ORDER_ITEM_STATUS_YSC == o["statusCd"]) {
                paramObj.STATUS_CD = "作废";
              } else {
                paramObj.STATUS_CD = "";
              }

              paramObj.BT = o["busiTypeName"];
              // if ("98000001" == o['BT']) {    //---
              //           paramObj.BT = "A端业务";
              //         } else if ("98000002" == o['BT']) {
              //           paramObj.BT = "B端业务";
              //         } else if ("98000003" == o['BT']) {
              //           paramObj.BT = "海外公司B端业务";
              //         } else if ("98000004" == o['BT']) {
              //           paramObj.BT = "C端业务";
              //         } else if ("98000005" == o['BT']) {
              //           paramObj.BT = "双端业务";
              //         } else {
              //           paramObj.BT = "";
              //         }

              paramObj.PRIORITY = o["priorityName"];

              param.push(paramObj);
            }

            this.exportExcelOfferList(param);
            /*accNum: ""
acceptLanId: "500181464"
acceptRegionId: "500181464"
addressDesc: (...)
applyObjSpec: (...)
batchNbr: (...)
belongCustId: (...)
busiManagerId: (...)
busiManagerName: (...)
busiTypeName: (...)
contactName: (...)
createDate: (...)
createOrgId: (...)
createPost: (...)
createStaff: (...)
custId: (...)
custOrderId: (...)
custSoNumber: (...)
flowInstId: (...)
handleStateCd: (...)
handleStateCdName: (...)
lastStateCd: (...)
lastStateCdName: (...)
mainOrderItemFlag: (...)
mobilePhone: (...)
objId: (...)
offerInstId: (...)
offerName: (...)
operType: (...)
ordProdInstId: (...)
orderAuditId: (...)
orderItemCd: (...)
orderItemId: (...)
orderItemObjId: (...)
orderItemSeq: (...)
parOrderItemId: (...)
preHandleFlag: (...)
prodId: (...)
prodInstId: (...)
prodName: (...)
prodOfferId: (...)
rate: (...)
regionId: (...)
regionRange: (...)
reqOrderDate: (...)
reqType: (...)
roleCd: (...)
serviceOfferId: (...)
serviceOfferName: (...)
statusCd: (...)
statusCdName: (...)
statusDate: (...)
updateDate: (...)
useCustId: (...)
useCustName: (...)
verNum: (...)
zAddressDesc: (...)
zContactName: (...)
zMobilePhone: (...)
zUseCustName: (...)
*/

            return;
          }

          if (funcCode == "OUTPUT_SERVICE_NOTICE") {
            // 业务通知单
            (templateType = "2001"), (xsName = "业务通知单");
          } else if (funcCode == "EXPORT_ORDER_JGD") {
            // 输出竣工单
            (templateType = "2002"), (xsName = "竣工单");
          } else if (funcCode == "EXPORT_ORDER_QZD") {
            // 输出竣工单
            (templateType = "2003"), (xsName = "起租单");
          } else if (funcCode == "EXPORT_DD_INFO") {
            // 输出订单明细
            (templateType = "2010"), (xsName = "订单明细");
          } else if (funcCode == "EXPORT_XQD") {
            // 输出需求单
            (templateType = "2008"), (xsName = "需求单");
          }
          this.outputNoticeExcel(templateType, xsName);
        } else if ("DEAL" == paramType) {
          if (funcCode == "YWJD") {
            //业务接单
            this.pendItemVisible = true;
            return;
          } else if (funcCode == "TACHE00150001") {
            // 确认起租日期
            this.pendItemVisible = true;
            return;
          } else if (funcCode == "TACHE10020001") {
            //审核退单
            this.pendItemVisible = true;
            return;
          } else if (funcCode == "TACHE10570001") {
            //月租费收款单位确认
            this.pendItemVisible = true;
            return;
          } else if (funcCode == "TACHE10550001") {
            //一次费收款单位确认
            this.pendItemVisible = true;
            return;
          } else if (funcCode == "AAA") {
            //A端业务交付确认
            var custSoNumber = this.custorder.custSoNumber;
            var orderItemIds = "";
            for (var i = 0; i < this.selectedItems.length; i++) {
              if (i == 0) {
                orderItemIds = this.selectedItems[i].orderItemId;
              } else {
                orderItemIds += "," + this.selectedItems[i].orderItemId;
              }
            }
            var orderItemSeqs = "";
            for (var j = 0; j < this.isContent.CTOInfo.length; j++) {
              if (j == 0) {
                orderItemSeqs = this.isContent.CTOInfo[j].orderItemSeq;
              } else {
                orderItemSeqs += "," + this.isContent.CTOInfo[j].orderItemSeq;
              }
            }
            var param = {};
            param.custSoNumber = this.custorder.custSoNumber;
            param.jOrderItemIds = orderItemIds;
            param.userId = this.user.staffId;
            param.oneOrmany = "one";
            param.taskId = "TACHE10250001";
            param.orderAuditId = this.custorder.orderAuditId;
            param.custId = this.custorder.custId;

            var result = await CustOrderService.doWorkItem(param);

            if (result.meta.resultCode == "0") {
              this.$confirm(result.meta.resultMsg, "提示", {
                confirmButtonText: "确定",
                showCancelButton: false,
                type: "success",
                center: true,
              });
            } else {
              this.$confirm(result.meta.resultMsg, "提示", {
                confirmButtonText: "确定",
                showCancelButton: false,
                type: "warn",
                center: true,
              });
            }
          } else if (funcCode == "QCBJ") {
            //全程报竣
            this.isContent.width = "95%";
            this.isContent.top = "1%";
            this.pendItemVisible = true;

            return;
          } else if (funcCode == "HSZF") {
            //资费核实
            this.isContent.width = "95%";
            this.isContent.top = "1%";
            this.pendItemVisible = true;
            return;
          } else if (funcCode == "ZXDC") {
            //填报资源
            //this.isContent.width = "95%";
            var orderItemIds = "";
            for (var i = 0; i < this.selectedItems.length; i++) {
              if (i == 0) {
                orderItemIds = this.selectedItems[i].orderItemId;
              } else {
                orderItemIds += "," + this.selectedItems[i].orderItemId;
              }
            }
            this.isContent.ODKInfo.orderItemIds = orderItemIds;
            this.pendItemVisible = true;
            return;
          } else if (funcCode == "TACHE00120001") {
            //批量竣工交付
            var jOrderItemIds = "";
            let orderItemIds = "";
            for (var i = 0; i < this.selectedItems.length; i++) {
              if (i == 0) {
                orderItemIds = this.selectedItems[i].orderItemId;
              } else {
                orderItemIds += "," + this.selectedItems[i].orderItemId;
              }
            }
            var params = {};
            params.taskId = "TACHE00120001";
            params.userId = this.user.staffId;
            params.custId = this.custorder.custId;
            params.orderItemIds = orderItemIds;
            params.custOrderId = this.custorder.custOrderId;
            params.prodId = this.selectedItems[0].prodId;
            params.templateType = "2002";
            var result = await CustOrderService.outputNoticeExcel(params);
            const blob = new Blob([result]);
            let fileName = "竣工交付.xls";
            if ("download" in document.createElement("a")) {
              const elink = document.createElement("a");
              elink.download = fileName;
              elink.style.display = "none";
              elink.href = URL.createObjectURL(blob);
              document.body.appendChild(elink);
              elink.click();
              URL.revokeObjectURL(elink.href);
              document.body.removeChild(elink);
            } else {
              navigator.msSaveBlob(blob, fileName);
            }
            if (result.type != "" && result.type != null) {
              var reqParam = {};
              reqParam.custSoNumber = this.selectedItems[0].custSoNumber;
              // reqParam.processInstId = this.selectedItems[0].processInstId;
              // reqParam.activityId = this.isContent.ODKInfo.activityInstId;
              reqParam.orderItemIds = orderItemIds;
              reqParam.userId = this.user.staffId;
              reqParam.oneOrmany = "one";
              reqParam.taskId = "TACHE00120001";
              reqParam.orderAuditId = this.custorder.orderAuditId;
              reqParam.custId = this.custorder.custId;

              var result = await CustOrderService.doWorkItem(reqParam);

              if (result.meta.resultCode == "0") {
                this.$confirm(result.meta.resultMsg, "提示", {
                  confirmButtonText: "确定",
                  showCancelButton: false,
                  type: "success",
                  center: true,
                });
              } else {
                this.$confirm(result.meta.resultMsg, "提示", {
                  confirmButtonText: "确定",
                  showCancelButton: false,
                  type: "warn",
                  center: true,
                });
              }
            }
            return;
          }
        }
      }
    },
    async outputNoticeExcel(type, xsName) {
      let param = {
        custOrderId: this.isContent.CTOInfo[0].custOrderId,
        prodId: this.isContent.CTOInfo[0].prodId,
        orderItemIds: "",
        userId: this.user.staffId + "",
        custId: this.isContent.CTOInfo[0].custId,
        templateType: type,
      };
      //多选时传多个
      let orderItemIdArr = [];
      this.isContent.CTOInfo.forEach((item, index) => {
        orderItemIdArr.push(item.orderItemId);
      });
      param.orderItemIds = orderItemIdArr.toString();
      const res = await CustOrderService.outputNoticeExcel(param);
      const blob = new Blob([res]);
      let fileName = xsName + ".xls";
      if ("download" in document.createElement("a")) {
        const elink = document.createElement("a");
        elink.download = fileName;
        elink.style.display = "none";
        elink.href = URL.createObjectURL(blob);
        document.body.appendChild(elink);
        elink.click();
        URL.revokeObjectURL(elink.href);
        document.body.removeChild(elink);
      } else {
        navigator.msSaveBlob(blob, fileName);
      }
    },
    //输出销售品列表
    async exportExcelOfferList(paramData) {
      let param = {
        templateType: 103,
        offerList: paramData,
      };

      const res = await CustOrderService.exportExcelOfferList(param);
      const blob = new Blob([res]);
      let fileName = "销售品列表.xls";
      if ("download" in document.createElement("a")) {
        const elink = document.createElement("a");
        elink.download = fileName;
        elink.style.display = "none";
        elink.href = URL.createObjectURL(blob);
        document.body.appendChild(elink);
        elink.click();
        URL.revokeObjectURL(elink.href);
        document.body.removeChild(elink);
      } else {
        navigator.msSaveBlob(blob, fileName);
      }
    },

    async validateTASKORDERITEM(funcCode) {
      if (funcCode == null) {
        funcCode = this.isContent.ODKInfo.FUNC_CODE;
      }
      var taskId = "";
      if (
        "ZXDC" == funcCode ||
        "HSZF" == funcCode ||
        "YWJD" == funcCode ||
        "A_DATE" == funcCode ||
        "ECHC" == funcCode
      ) {
        taskId = this.isContent.ODKInfo.WEB_PAGE_PARA;
      } else {
        if ("TACHE10020001" == funcCode) {
          //					var  cnt =  ruleTrig.call("qryIsIDC","custSoNbr#"+custSoNumber);//0012154
          //					if(cnt==0){
          taskId = "TACHE30010001,TACHE10020001,TACHE10020004"; //三个都是退单审核任务 正常、idc、otn
          //					}else{
          //
          //						data.TASK_ID = funcCode;
          //					}
        } else {
          taskId = funcCode;
        }
      }

      var orderItemIds = "";
      for (var i = 0; i < this.isContent.CTOInfo.length; i++) {
        if (i == 0) {
          orderItemIds = this.isContent.CTOInfo[i].orderItemSeq;
        } else {
          orderItemIds += "," + this.isContent.CTOInfo[i].orderItemSeq;
        }
      }

      let usersMsg = {
        acceptUserOrg: this.user.staffId,
        orderItemIds: orderItemIds,
        taskIds: taskId,
        custSoNumber: this.isContent.CTOInfo[0].custSoNumber,
      };

      var res = await CustOrderService.validateOrderItem(usersMsg);

      return JSON.parse(res.meta);
    },
    getOrderItemSeqs(SelRows) {
      var itemSeqs = "";
      $.each(SelRows, function (i, obj) {
        itemSeqs += obj.ORDER_ITEM_SEQ + ",";
      });

      var orderItemSeqs = itemSeqs.substring(0, itemSeqs.length - 1);

      return orderItemSeqs;
    },

    async validateRtnBackOrder(handleStateCd) {
      var flag = true;
      // 1.受理阶段必须是需求单阶段才能退回
      if ("50030003" == handleStateCd) {
        this.$confirm("受理阶段必须是需求单阶段才能退回需求单!", "提示", {
          confirmButtonText: "确定",
          showCancelButton: false,
          type: "warn",
          center: true,
        });
        flag = false;
        return false;
      }
      // 2.订单发起人才能退回
      if (staffId != userId) {
        this.$confirm("订单发起人才能退回需求单!", "提示", {
          confirmButtonText: "确定",
          showCancelButton: false,
          type: "warn",
          center: true,
        });
        flag = false;
        return false;
      }
      // 3.待送审核的订单才可退回需求单
      if ("0" != sendFlag) {
        this.$confirm("待送审核的订单才可退回需求单!", "提示", {
          confirmButtonText: "确定",
          showCancelButton: false,
          type: "warn",
          center: true,
        });
        flag = false;
        return false;
      }
      return flag;
    },

    // 打开转订单弹窗
    open() {
      this.$confirm("转订单成功！", "提示", {
        confirmButtonText: "确定",
        showCancelButton: false,
        type: "success",
        center: true,
      });
    },
    baseFilterChange() {},
    handleSelectionChange(item) {
      this.selectedItems = item;
    },
    /**
     * 操作按钮事件
     */
    operating() {},
    /**
     * 处理按钮事件
     */
    dealwith() {},
    /**
     * 输出按钮事件
     */
    output() {},
    handlePageChange({ currentPage, pageSize }) {
      let params = JSON.parse(localStorage.getItem("selectCardCondition"));
      params.pageInfo.pageSize = pageSize;
      params.pageInfo.pageIndex = currentPage;
      localStorage.setItem("selectCardCondition", JSON.stringify(params));
      this.qryPendingOrderItemList(params);
    },
    doBatchCHA_DATE() {
      this.chaDateVisible = false;
      console.log("执行批量修改完成时间");
    },
    // 当前页
    // salesHandleCurrentChange(val) {
    //   let params = JSON.parse(localStorage.getItem("selectCardCondition"));
    //   params.pageInfo.pageIndex = val;
    //
    //   localStorage.setItem("selectCardCondition", JSON.stringify(params));
    //   this.qryPendingOrderItemList(params);
    // },
    // // 每页多少条
    // salesHandleSizeChange(val) {
    //   let params = JSON.parse(localStorage.getItem("selectCardCondition"));
    //   params.pageInfo.pageSize = val;
    //   localStorage.setItem("selectCardCondition", JSON.stringify(params));
    //   this.qryPendingOrderItemList(params);
    // },
  },
};
</script>
<style scoped lang="scss">
//::v-deep .el-dialog__body {
//  padding: 0.15rem 0.2rem;
//}
//::v-deep .el-table th, .el-table td{
//  padding: 0!important;
//}
//::v-deep .el-table .cell{
//  height: .5rem;
//  line-height: .5rem;
//}
.popper__arrow {
  top: 50%;
  left: -6px;
  margin-bottom: 3px;
  border-right-color: #12357b;
  border-left-width: 0;
}
.ne-order-pos {
  height: 83vh;
  padding: 0 0.1rem;

  .ne-m-right {
    margin-right: 0.1rem;
  }

  ::v-deep .el-input__inner {
    height: 0.34rem;
    line-height: 0.34rem;
    font-size: 0.13rem;
    min-height: 30px;
  }

  .ne-radio-group {
    padding-left: 0.2rem;

    label {
      line-height: 0.34rem;
    }
  }

  .ne-exp {
    li {
      padding-right: 0.2rem;

      p {
        display: inline-block;
        width: 0.3rem;
        height: 0.15rem;
        border-radius: 0.05rem;
        margin-right: 0.07rem;
      }

      span {
        color: $textColor1;
      }
    }
  }

  .ne-btn {
    min-height: auto;
    height: auto;
    line-height: normal;
    cursor: pointer;
    //border: 1px solid $blue;
    //background-color: #e6eefb;
    //color: $blue;
    padding: 0.05rem 0.05rem;
    margin: 0 0.05rem;
    border-radius: 0.03rem;

    i {
      margin-right: 0.02rem;
    }
  }
}

.warn-red {
  background-color: red;
}
.warn-red-f {
  color: red;
}

.warn-orange {
  background-color: orange;
}
.warn-orange-f {
  color: orange;
}
.warn-purple {
  background-color: purple;
}
.warn-purpl-f {
  color: purple;
}

.warn-green {
  background-color: green;
}
.warn-green-f {
  color: green;
}
.warn-blue {
  background-color: blue;
}
.warn-blue-f {
  color: blue;
}
.warn-normail {
  color: #333;
}

.ne-pending {
  .ne-pending-items {
      flex-wrap: wrap;
      min-width: 2.5rem;
      max-width: 5rem;
      li {
          padding: 0.05rem 0.05rem 0.05rem 0.25rem;
          width: 2.45rem;
      a {
        color: $textColor1;
        padding-left: 0.1rem;
        position: relative;

        &:hover {
          text-decoration: none;
          color: $blue;

          &:before {
            background-color: $blue;
          }
        }

        &:before {
          display: inline-block;
          content: "";
          position: absolute;
          left: 0;
          top: 0;
          bottom: 0;
          margin: auto;
          width: 0.05rem;
          height: 0.05rem;
          border-radius: 50%;
          background-color: $textColor1;
        }
      }
    }
  }
}

.jlTable > ::v-deep .el-table__fixed,
.el-table__fixed-right {
  height: auto !important;
  bottom: 17px !important;
}
.el-popover {
  border: 1px solid blue;
}
.u-fk {
  color: red;
}
.u-resource-fail {
  color: orange;
}
.u-jiaj {
  color: purple;
}
</style>
